aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/diag/logging.cpp
Commit message (Collapse)AuthorAgeFilesLines
* consistent paths encoding (#24)Dan Engelbrecht2024-03-251-2/+2
| | | | * Don't encode filesystem path to UTF8 unless stored in compactbinary string * Be consistent where we encode/decode paths to UTF8
* logging configuration via command line options (#589)Stefan Boberg2023-12-061-0/+4
| | | | | | | with these changes it is possible to configure loggers on the command line. For instance: `xmake run zenserver --log-trace=http_requests,http` will configure the system so that the `http_request` and `http` loggers are set to TRACE level
* spdlog implementation hiding (#498)Stefan Boberg2023-11-061-0/+4
| | | | | | | | | this change aims to hide logging internals from client code, in order to make it easier to extend and take more control over the logging process in the future. As a bonus side effect, the generated code is much tighter (net delta around 2.5% on the resulting executable which includes lots of thirdparty code) and should take less time to compile and link. Client usage via macros is pretty much unchanged. The main exposure client code had to spdlog internals before was the use of custom loggers per subsystem, where it would be common to have `spdlog::logger` references to keep a reference to a logger within a class. This is now replaced by `zen::LoggerRef` which currently simply encapsulates an actual `spdlog::logger` instance, but this is intended to be an implementation detail which will change in the future. The way the change works is that we now handle any formatting of log messages in the zencore logging subsystem instead of relying on `spdlog` to manage this. We use the `fmt` library to do the formatting which means the client usage is identical to using `spdlog`. The formatted message is then forwarded onto any sinks etc which are still implememted via `spdlog`.
* eliminate redundant logging code (#499)Stefan Boberg2023-10-251-719/+31
| | | | | | | | | zenutil and zenserver both contain very similar logging setup code and this change aims to make them have most code in common. * fullformatter/jsonformatter/RotatingFileSink are moved into dedicated header files in zenutil * zenserver `InitializeLogging`/`ShutdownLogging` are renamed `InitializeServerLogging`/`InitializeServerLogging` * these now call into the common zenutil `BeginInitializeLogging`/`FinishInitializeLogging` in addition to setting up server custom logging * `std::filesystem::path` is now logged after stripping any `\\\\?\\` prefix for readability
* New rotating file logger that keeps on running regardless of errors (#495)Dan Engelbrecht2023-10-251-13/+272
| | | * New rotating file logger that keeps on running regardless of errors
* zenserver project restructuring (#442)Stefan Boberg2023-10-061-2/+6
|
* added --quiet option to suppress default logging to stdout (#446)Stefan Boberg2023-10-041-3/+11
| | | | added --quiet option for zenserver to suppress default logging to stdout
* handle errors in spdlog gracefully (#410)Dan Engelbrecht2023-09-191-0/+29
| | | | * handle errors in spdlog gracefully - try to report and avoid termination * changelog
* Moved EnableVTMode function into zencore (#311)Stefan Boberg2023-05-161-28/+1
|
* implemented structured cache logging (#296)Stefan Boberg2023-05-121-7/+32
| | | | | | | | may be used as audit trail to help analyse potential cache pollution/corruption * also added common header with timestamp to all known log targets * made `Oid::operator bool` explicit to avoid logging/text format mishaps * made `HttpClient::operator bool` explicit
* moved source directories into `/src` (#264)Stefan Boberg2023-05-021-0/+467
* moved source directories into `/src` * updated bundle.lua for new `src` path * moved some docs, icon * removed old test trees