Commit graph

17 commits

Author SHA1 Message Date
Weiyi Wang
7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
Lioncash
798ebda049 logging/backend: Add missing standard includes
A few inclusions were being satisfied indirectly. To prevent breakages
in the future, include these directly.
2018-07-30 14:56:52 +08:00
Lioncash
765c7e711a logging/backend: Use std::string_view in RemoveBackend() and GetBackend()
These can just use a view to a string since its only comparing against
two names in both cases for matches. This avoids constructing
std::string instances where they aren't necessary.
2018-07-30 14:56:51 +08:00
Daniel Lim Wee Soong
51398e0301 Logging: Add customizable logging backends and fmtlib based macros
* Change the logging backend to support multiple sinks through the
Backend Interface
* Add a new set of logging macros to use fmtlib instead.
* Qt: Compile as GUI application on windows to make the console hidden by
default. Add filter configuration and a button to open log location.
* SDL: Migrate to the new logging macros
2018-04-23 21:32:56 -06:00
Daniel Lim Wee Soong
c892cea029 Place FmtLogMessage's definition in backend.cpp
I decided to overload LogMessage because I don't see a reason to come up with a new function name just for this, but if you guys want me to overload FmtLogMessage instead I'm fine with that.
2018-03-21 23:36:45 +08:00
Daniel Lim Wee Soong
373efd3158 Logging: Remove customizable logging backends
Separate code for customizing logging backends from this branch
2018-03-16 11:56:40 +08:00
Daniel Lim Wee Soong
eee388588e Logging: Fix fmt errors after rebasing with master
fmt was updated during the clang-format update, which breaks the previous implementation of FmtLogMessage

Changes were:
* Move definition of FmtLogMessage into log.h to use variadic templates as FMT_VARIADIC was removed

To supplement the change above:
* Move Entry and CreateEntry into log.h
* Add LogEntry in backend.cpp
2018-03-16 11:48:33 +08:00
James Rowe
87bc5266ef Logging: Various logging improvements
* Uses PopWait to reduce the amount of busy waiting if there aren't many
new logs
* Opens the log file as shared on windows, letting other programs read
the logs, but not write to them while citra is running
* Flushes the logs to disk if a log >= error arrives
2018-03-16 11:18:06 +08:00
James Rowe
7b78425d6b Address review comments 2018-03-16 11:18:06 +08:00
James Rowe
0daac3020e Logging: Add customizable logging backends and fmtlib based macros
* Change the logging backend to support multiple sinks through the
Backend Interface
* Add a new set of logging macros to use fmtlib instead.
* Qt: Compile as GUI application on windows to make the console hidden by
default. Add filter configuration and a button to open log location.
* SDL: Migrate to the new logging macros
2018-03-16 11:18:06 +08:00
Emmanuel Gil Peyrot
ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Emmanuel Gil Peyrot
dc8479928c Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
Lioncash
c89e3d5951 backend: defaulted move constructor/assignment 2016-02-04 22:39:33 -05:00
Yuri Kunde Schlesner
b88c91dd3d Common: Remove async logging
It provided a large increase in complexity of the logging system while
having a negligible performance impact: the usage patterns of the ring
buffer meant that each log contended with the logging thread, causing
it to effectively act as a synchronous extra buffering.

Also removed some broken code related to filtering of subclasses which
was broken since it was introduced. (Which means no one ever used that
feature anyway, since, 8 months later, no one ever complained.)
2015-05-12 02:31:04 -03:00
Emmanuel Gil Peyrot
0aa44e238d Logging: check for filter before sending to the queue, to skip all heavy formatting on the other thread. 2015-03-06 19:23:52 +01:00
purpasmart96
ebfd831ccb License change 2014-12-20 21:20:24 -08:00
Yuri Kunde Schlesner
616d874443 New logging system 2014-12-13 01:59:52 -02:00