tt4g

Results 173 comments of tt4g
trafficstars

Per-log-level formatting is not supported. However, you can create your own custom sink and format it specifically for each log level. Wiki: https://github.com/gabime/spdlog/wiki/4.-Sinks#implementing-your-own-sink Use the format flags `%@` and `%!...

The lifetime of the spdlog logger is managed by `std::shared_ptr`. If you want to access it safely in a destructor, just copy `std::shared_ptr` into a member variable.

`static` objects will be destroyed after the application is exited. Unless you call spdlog from the destructor of `static` object, I don't think you will have this problem.

Hmmm, this must be a problem with the library design. I think it would be difficult to remove many `static` objects from the spdlog project (because it would break the...

If you have libpqxx installed, you can add `find_package(libpqxx REQUIRED)` to your project's `CMakeLists.txt` and CMake will find libpqxx installed on your machine and import it into your CMake project....

This is the big WebFlux and MVC difference. I wasted a lot of time debugging the reason why CSRF tokens were not found in the cookie.

> i want to replace it with datatime; datetime? if so, you can use `spdlog::sinks::daily_file_sink`. Wiki: https://github.com/gabime/spdlog/wiki/4.-Sinks

@jgreber Timestamp and index rotation are not supported. See `spdlog::sinks::rotating_file_sink` rotation method. Rotation is done by calculating the index to be given at the end of the file from `max_files_`....

There is no API to notify asynchronous log drops. However, `spdlog::details::thread_pool::overrun_counter()` lets you know how many logs were dropped due to overruns. https://github.com/gabime/spdlog/blob/f44fa31f5110331af196d0ed7f00ae1c7b8ef3cc/include/spdlog/details/thread_pool.h#L99-L100