Questions tagged [spdlog]

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

GitHub Project

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

118 questions
0
votes
1 answer

Grabbing printed statements from console C++

I have two loggers in my program. One that I made inside a gui, and one that is super complicated but very well designed and prints to the console. I am trying to get the output from the nice console logger to the rendered one. I have tried…
Yea okay
  • 135
  • 8
0
votes
2 answers

How to escape spdlog message?

I'm using spdlog to log all messages. My log pattern is a JSON format. I'm escaping messages manually in all log calls. Is there any way exists to escape messages automatically in spdlog layer? Sample of manually…
mortymacs
  • 3,456
  • 3
  • 27
  • 53
0
votes
1 answer

Spdlog doesn't add to a file

I want to configure the logger in another file, but when I do this, the logger doesn't add anything to this file. Why? For simplicity I got the following example from the library documentation(the function body). *.cpp namespace logger { void…
nnuttertools
  • 131
  • 8
0
votes
1 answer

Why msvc can't find "spdlog/spdlog.h" header?

Code Repository: https://github.com/fastype/fastype This project use build.bat initialize on Windows 10 with Visual Studio 2017. It will clone the github repositories and build third party dependencies, then create visual studio sln project file via…
linrongbin
  • 2,967
  • 6
  • 31
  • 59
0
votes
1 answer

Why spdlog/pthread include directory is empty via pkg_search_module in CMake on macos?

Environment OS: macos package manager: homebrew build tool: cmake, pkg-config, clang repository: https://github.com/xedit/xedit they're all newest version. CMakeLists.txt the CMakeLists.txt are: project(xeditd LANGUAGES CXX VERSION…
linrongbin
  • 2,967
  • 6
  • 31
  • 59
0
votes
1 answer

Spdlog v1.3.1 examples of async logger are giving error in ubuntu 18.04

I have installed spdlog manually from git repo having version 1.3.1 in version.h . Now i am trying to execute basic examples given in the repository but they are giving certain errors. Synchronous loggers example are running fine though. I have…
nishu jain
  • 11
  • 1
  • 5
0
votes
1 answer

spdlog logging a single wchar_t string containing data which inculdes {...}

I am using spdlog with a registry application. I am getting an exception when attempting to log a single wchar_t string containing a reprentation of a CLSID, say "{0C092C21-882C-11CF-A6BB-080C7B2D682}". I understand that in spdlog "{}" is a…
mgriggle
  • 1
  • 1
0
votes
1 answer

Installing spdlog by copying contents of include directory

I'm trying to use spdlog as a logging library, but I do not want to use my package manager (apt) to install it. I have copied the spdlog directory under include to the root of my project directory, but when I try to compile I get include errors…
Nick Silvestri
  • 191
  • 1
  • 15
0
votes
1 answer

spdlog unexpected include reference point

I am trying to use spdlog library in an hello world. #include "spdlog/spdlog.h" int main() { return 0; } Since it is "header only" library I just copied it to my project's root and expected everything to just work. |+ hello.cpp …
kroiz
  • 1,722
  • 1
  • 27
  • 43
0
votes
1 answer

Log from a dynamically loaded library

I have a C++ desktop app that can log messages using the 'spdlog' library (https://github.com/gabime/spdlog). Now, I'd like to use the same logger from a dynamically loaded DLL. However, when I try to use spdlog from the DLL, I get a crash. How can…
Dess
  • 2,064
  • 19
  • 35
0
votes
1 answer

C++ | spdlog | How to have sincs with different formatters?

I am using spdlog library for C++ logging. I have a logger with both stdout and rotating_file_sink_mt sincs: auto std_out_sinc = std::make_shared(); auto file_sinc =…
motam79
  • 3,542
  • 5
  • 34
  • 60
0
votes
2 answers

C++ SPDLOG compilation error: variable or field ‘set_error_handler’ declared void

I'm trying to use spdlog in my project. According to spdlog docu, I just need to copy files under include folder and use a C++ 11 compiler. I copied the /include/spdlog folder to my project root folder but I'm having a lot of errors after trying to…
sabanana
  • 43
  • 6
-1
votes
1 answer

Accessing an external project with add-subdirectory results in CMake Error related to export set

I have a project A that depends on spdlog. Here is the structure: |--- dir A ...|---src ......|---CMakeLists.txt ...|---include ...|---CMakeLists.txt |---external/3rd_party/spdlog I am trying to access spdlog in project A by adding a subdirectory.…
AK007
  • 1
  • 2
1 2 3 4 5 6 7
8