aboutsummaryrefslogtreecommitdiff
path: root/src/zenutil/logging.cpp
Commit message (Collapse)AuthorAgeFilesLines
* added ResetConsoleLog (#758)Stefan Boberg2026-02-161-0/+5
| | | also made sure log initialization calls it to ensure the console output format is retained even if the console logger was set up before logging is initialized
* Make sure we call the previous terminate handle if present when we intercept ↵Dan Engelbrecht2025-09-261-6/+39
| | | | | | terminate calls (#514) Improvement: Make sure we call the previous terminate handle if present when we intercept terminate calls Improvement: Avoid allocating memory for call stack in terminate handle and assert callback
* rework `--quiet` zenserver option add `--noconsole` option (#477)Dan Engelbrecht2025-08-261-0/+4
| | | | - Improvement: Changed zenserver `--quiet` option to suppress INFO level messages and below to surface startup and runtime errors - Feature: Added `--noconsole` option that suppresses all output to standard out, this works as the `--quiet` option used to work
* fixes for log timestamps (#304)Stefan Boberg2025-03-121-2/+4
| | | | | | * add GetTimeSinceProcessStart returning time since process start. implemented using https://github.com/maxliani/GetTimeSinceProcessStart/tree/main * fix fractions when using epoch mode. Previously it would show the fraction from the absolute time stamp and not relative to epoch * used GetTimeSinceProcessStart to offset the epoch so that it represents the process spawn time
* Build command tweaks (#301)Stefan Boberg2025-03-111-12/+15
| | | | | | - Improvement: Don't chunk up .mp4 files as they generally won't benefit from deduplication or partial in-place-updates - Improvement: Emit build name to console output when downloading a build - Improvement: Added some debug logging - Bugfix: Logging setup would previously not function correctly when not logging to file
* improvements and infrastructure for upcoming builds api command line (#284)Dan Engelbrecht2025-02-251-1/+8
| | | | | | | | | | | | | | * add modification tick to filesystem traversal * add ShowDetails option to ProgressBar * log callstack if we terminate process * handle chunking if MaxSize > 1MB * BasicFile write helpers and WriteToTempFile simplifications * bugfix for CompositeBuffer::IterateRange when using DecompressToComposite for actually comrpessed data revert of earlier optimization * faster compress/decompress for large disk-based files * enable progress feedback in IoHash::HashBuffer * add payload validation in HttpClient::Get * fix range requests (range is including end byte) * remove BuildPartId for blob/block related operations in builds api
* added support for dynamic LLM tags (#245)Stefan Boberg2024-12-021-0/+5
| | | | | * added FLLMTag which can be used to register memory tags outside of core * changed `UE_MEMSCOPE` -> `ZEN_MEMSCOPE` for consistency * instrumented some subsystems with dynamic tags
* consistent paths encoding (#24)Dan Engelbrecht2024-03-251-1/+1
| | | | * Don't encode filesystem path to UTF8 unless stored in compactbinary string * Be consistent where we encode/decode paths to UTF8
* reinstate formatter settings for file sink (#631)Stefan Boberg2024-01-171-0/+9
| | | fixes issue introduced in #615
* Make sure we initialize the pattern of FileSink before it is added as a ↵Dan Engelbrecht2023-12-181-12/+8
| | | | usable logger (#615)
* fix crash at log exit (#605)Dan Engelbrecht2023-12-131-7/+5
| | | * keep g_FileSink alive until spdlog has shut down
* premature logging shutdown fix (#603)v0.2.36Stefan Boberg2023-12-121-0/+9
|
* multi-line logging improvements (#597)Stefan Boberg2023-12-111-2/+3
| | | | | | * added ZEN_SCOPED_WARN and implemented multi-line logging * changed so file log also uses `fullformatter` for consistency and to get the multi-line support across the board
* logging configuration via command line options (#589)Stefan Boberg2023-12-061-4/+5
| | | | | | | 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
* fixed file logger pattern (#579)Stefan Boberg2023-11-291-1/+1
| | | | previously, the millisecond part was inexplicably logged after the date, not the time.
* spdlog implementation hiding (#498)Stefan Boberg2023-11-061-10/+11
| | | | | | | | | 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`.
* fixed issue where file log sink would get the wrong pattern assigned (#513)Stefan Boberg2023-11-061-12/+12
| | | | this made the file log emit relative timing instead of an absolute timestamp prefix
* eliminate redundant logging code (#499)Stefan Boberg2023-10-251-409/+93
| | | | | | | | | 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
* added logging utility functions (from sb/proto) (#469)Stefan Boberg2023-10-121-0/+516
these allow standalone programs to share much of the logging setup from zenserver