I have a simple project which requires three header-only libraries in order to compile: websocketpp, spdlog and nlohmann/json.
The project structure looks like this:
└── src
├── app
│ ├── CMakeLists.txt
│ ├── src
│ └── test
…
I am trying to use spdlog in a project involving a library under windows.
I create two loggers. One for the app using the library, one for the library itself.
The library's logger is created from the app but when the library want to add a message,…
I am creating c++ library modules in my application. To do logging, I use spdlog. But in a production environment, I don't want my lib modules to do any logging. One way to achieve turning on/off would be to litter my code with #ifdef…
Is there a way to extend spdlog to support a custom struct as an item when formatting using {}?
So when I have a
struct p {
int x;
int y;
int z;
};
p my_p;
I want to do
spdlog::info("p = {}", my_p);
// after registering some kind of…
I want to include spdlog into one of my project. It is a header only library. The project that i am building is using cmake. Currently i am using
include_directories('src/logger/spdlog/')
in cmake and including the library as
#include…
I'm working on a C++ project that uses two different libraries: spdlog for logging, and mutils-serialization for serializing objects to bytes (for sending over the network). Both libraries use namespaces properly, but when I attempt to write a…
I am trying to load images using stb_image.h but I am getting two compiler errors in the version of provided by gcc. I figure that there is probably a compiler option that is needed but I haven't been able to find what it is.
Error…
I am trying to use spdlog. I incorporated it with my code, but now I am getting the following error:
....fmt\core.h(1016): error C2338: Cannot format argument. To make type T formattable provide a formatter specialization:…
I am using spdlog's asynchronous logging. I create a console window and redirect stdout and stderr to it at a late point in the application. spdlog works fine after I have the window ready. But before that, I miss the logs. Basically, I have the…
The following code :
#include "spdlog/spdlog.h"
#include "spdlog/sinks/stdout_color_sinks.h"
int main() {
auto stdout_sink = std::make_shared();
auto a = std::make_shared("a", stdout_sink);
…
I need to reference spdlog 1.7.0 revision 1eebff2f51d90cb700b63c6d2449ebcb, not the latest revision, but I cannot seem to do this. Specifying revision requires the user/channel#REV syntax, but recipes on conan index doesn't seem to have…
I recently switched from Boost Log to Spdlog for the purported speed advantages.
However, when I compared the runtimes before and after the switch, I'm finding that Boost Log is significantly faster. I'm wondering if I'm doing something wrong with…
I want to declare identifiers for scopes which will be used to automatically populate a field of any logging statements within the innermost scope. They will usually, but not always (e.g. lambdas, blocks introduced with {}), match the "name" of the…
I'm using spdlog to run logs for both managed and unmanaged code in Visual Studio. For that reason I've written shell classes that use spdlog under the hood.
However, I'm running into problems with my unit tests. My unit tests run in a single…