Questions tagged [spdlog]

Very fast, header only, C++ logging library.

GitHub Project

Very fast, header only, C++ logging library.

118 questions
1
vote
1 answer

"Cannot format an argument" when using spdlog

I've been following along with The Cherno's game engine series, and I've run into an issue I can't seem to fix. This is the only part of the series so far that I don't understand, and nothing I've found on the internet has helped. We're creating an…
Joe Pigott
  • 11
  • 3
1
vote
1 answer

C++ : how to use spdlog to print custom class pointer?

I am facing a little problem. I need to use spdlog to log and I have custom classes. And since, spdlog is able to deal with user defined classes, I could use it log my classes. But, I my real application, I would like to feed spdlog with a pointer…
R. N
  • 707
  • 11
  • 31
1
vote
0 answers

spdlog skipping debug statements

I was debugging a C++ code and stumbled upon a weird behavior from spdlog, where some debug and trace statements are skipped (I haven't tried with other log levels but I suspect they would have the same problem). Here is the code fragment in…
sunmat
  • 6,976
  • 3
  • 28
  • 44
1
vote
1 answer

Get log from spdlog in qtextedit object from qt

I am trying to redirect my log in a qtextedit windows. I use this post : Redirecting std::cout from DLL in a separate thread to QTextEdit. Here is my test program : q_debugstream.h #ifndef ThreadLogStream_H #define ThreadLogStream_H #include…
Kafka
  • 720
  • 6
  • 21
1
vote
2 answers

How to use spdlog

I am new to c++, please don't grill too much. I am trying to use spdlog in C++ program and using CLion from Jetbrains. Here is my screenshot but don't know what I am doing wrong. Please advise what I am doing wrong . This is my main.cpp #include…
Shax
  • 4,207
  • 10
  • 46
  • 62
1
vote
1 answer

spdlog question : is there a way not output timestamp?

my use case is to just use spdlog as my serialization library. For example. I would like to output json data, but the timestamp goes together with the json make it an invalid json syntax. Of course I could remove the time stamp programmatically…
baltam
  • 53
  • 5
1
vote
1 answer

Why can't I link to spdlog library installed with conan

I have a simple CMake project and try to use the spdlog library (version 1.5.0) installed by conan. But when building I get the following error: undefined reference to `spdlog::get(std::__cxx11::basic_string,…
samoncode
  • 466
  • 2
  • 7
  • 23
1
vote
1 answer

How to set cpu affinity for thread being used by spdlog when using spdlog for logging in async mode?

I am using spdlog for logging in async mode. I want to assign the task of logging to just one cpu core. Is there an API to achieve this in spdlog?
Snakeeye
  • 31
  • 3
1
vote
1 answer

Getting multiple redifinition errors when trying to build using CMake and MinGW64

I've come across a problem that I can't seem to fix. I'm trying to build a project which makes use of a logging library called spdlog but it won't build when I use it in my project. MinGW64 reports that there's multiple definitions for some…
Steven
  • 21
  • 1
  • 4
1
vote
1 answer

4 same unhelpful errors for every error I receive in c++

I am using spdlog, opengl, glad, and glfw in my project. No matter what error I am receiving, it is ALWAYS preceded by the 4 same errors. For example, let's say I have the following code: std::cout << "sup"; then it will run perfectly. Okay now,…
Yea okay
  • 135
  • 8
1
vote
1 answer

Logging with spdlog (C++), logger is not writing log to file

I am trying to log basic information in a text file while performing testing with google test. My ultimate goal is to log the trace of an exception. In the project I am using C++11, the latest version of Google tests added to the project through…
Mattia Strocchi
  • 25
  • 1
  • 1
  • 5
1
vote
0 answers

How to redirect a defined ostream from a 3rd party library to a spdlog logger?

I have changed the logging and printout of messages in one of my application by the spdlog library. Everything works within the code that I control. The issue that I faced is that I do not manage to redirect the print out and other error messages…
oyoman
  • 11
  • 2
1
vote
2 answers

spdlog crash on factory methods

Yesterday I have started including spdlog into a personal project of mine to use for logging. So far I have had some problems with getting library inclusion to work but those are now solved completely. Now everything compiles just fine, with all…
TokenGuard
  • 29
  • 2
  • 5
1
vote
2 answers

Why Qt Creator's application output does not print from spdlog logger

I have working logging in Visual studio project using spdlog. I used the same project in Qt creator, then the spdlog logging does not output anything. But the std::cout still works and prints to Qt creator's application output window.…
Main
  • 1,804
  • 3
  • 20
  • 28
1
vote
1 answer

How to attach Windows Debug Logger to spdlog

I wondering how to attach windows debug logger to spdlog, which claim that it support Windows Debug Log (OutputDebugString) I can't find any example to do that. Thanks