Remove the fileapi.h include in os-inl.h (#3444)
Replaced fileapi.h include with windows.h, as instructed in https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-flushfilebuffers Otherwise this causes compilation error on older sdks.
Removed the fileapi.h include entirely, since windows.h is already included before
Co-authored-by: MasonAngelio
spdlog
Fast C++ logging library
Install
Header-only version
Copy the include folder to your build tree and use a C++11 compiler.
Compiled version (recommended - much faster compile times)
see example CMakeLists.txt on how to use.
Platforms
Package managers:
sudo apt install libspdlog-devbrew install spdlogsudo port install spdlogpkg install spdlogdnf install spdlogemerge dev-libs/spdlogpacman -S spdlogsudo zypper in spdlog-develapt-get install libspdlog-develvcpkg install spdlogconan install --requires=spdlog/[*]conda install -c conda-forge spdlogdepends: spdlog ^1.8.2Features
OutputDebugString(..)).Usage samples
Basic usage
Create stdout/stderr logger object
Basic file logger
Rotating files
Daily files
Backtrace support
Periodic flush
Stopwatch
Log binary data in hex
Logger with multi sinks - each with a different format and log level
Register several loggers - change global level
User-defined callbacks about log events
Asynchronous logging
Asynchronous logger with multi sinks
User-defined types
User-defined flags in the log pattern
Custom error handler
syslog
Android example
Load log levels from the env variable or argv
So then you can:
Log file open/close event handlers
Replace the Default Logger
Log to Qt with nice colors
Mapped Diagnostic Context
Benchmarks
Below are some benchmarks done in Ubuntu 64 bit, Intel i7-4770 CPU @ 3.40GHz
Synchronous mode
Asynchronous mode
Documentation
Documentation can be found in the wiki pages.
Powered by