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

Spdlog and VS2019 Intellisense errors

I'm using VS2019 (16.11.3) and Spdlog 1.9.2. This is the code I'm using: auto logger = std::make_shared("CORE", std::begin(sinks), std::end(sinks)); logger->log(spdlog::level::info, "This works"); std::string test =…
aghidini
  • 2,855
  • 5
  • 29
  • 32
0
votes
2 answers

error while trying to link spdlog static lib with cmake

I installed spdlog static lib using there doc and try to link it to my program using there example the installation path is this: /home/yaodav/Desktop/dnr_main_repo/lib/external this is my CMAKE: cmake_minimum_required(VERSION…
yaodav
  • 1,126
  • 12
  • 34
0
votes
1 answer

SPDLOG_LOGGER_CALL and __VA_ARGS__ in

I'm trying to understand why my variadic arguments don't work in spdlog. I understand that there is an SPDLOG_LOGGER_INFO macro to do what I do, but at the moment I need to understand how SPDLOG_LOGGER_CALL works. So here is the code: #include…
flashburn
  • 4,180
  • 7
  • 54
  • 109
0
votes
1 answer

Base Class causes Compilation Error (Visual Studio)

Beginner here. I´ve recently written a bit of code to log using spdlog. I based it on a "Singleton" base class and it doesn´t seem to be working, which irritates me, since in all other cases that I´m using that exact "Singleton" base class it…
0
votes
1 answer

gcc arm error: '::fileno' has not been declared

I'm trying to get spdlog to work with on my embedded project. (Yes I know spdlog is not designed for embedded projects, but I'd like to give it a try ;)) I already managed to forward c++ std::thread, std::mutex etc to proper FreeRTOS Objects. So…
Dr.Death
  • 93
  • 9
0
votes
1 answer

Macro expansion which converts Google Logger print format(i.e. <<) to spdlog print format

I have tons of code which uses Google Logger style of log printing: LOG(ERROR) << "AAAA" <<< 123; And currently I need to replace Google logger by spdlog logger, which supports python like format: logger->error("{} {}", "param1", 123); Of course I…
user3518295
  • 180
  • 3
  • 14
0
votes
1 answer

I can't use spdlog loggers in a loop

I want to create log over a loop. Here is a simple exampe: #include #include "logging.hpp" int main(int argc,char* argv[]){ for(int i=1; i
Amir reza Riahi
  • 1,540
  • 2
  • 8
  • 34
0
votes
1 answer

Adding a lib to yocto rootfs

I am using this recipe, which by default doesn't copy the resulting .a lib (it expects header only usage I think) I am trying to get the resultant libspdlog.a into my sysroot, but I can't seem to make that happen. I coppied the recipe to my layer…
gcb
  • 366
  • 5
  • 16
0
votes
1 answer

spdlog header-only with external fmt. spdlog error: 'internal': is not a member of 'fmt'

I am using header-only spdlog as cmake's external project. find_program(GIT_EXECUTABLE git) ExternalProject_Add( spdlog PREFIX ${CMAKE_BINARY_DIR}/vendor/spdlog GIT_REPOSITORY "https://github.com/gabime/spdlog.git" GIT_TAG "v1.6.1" …
Chase Choi
  • 3
  • 1
  • 3
0
votes
0 answers

Use of several configurable loggers with spdlog

I am using spdlog in a C ++ application, where I have created a class that builds a log pool, with variable content in the pool, which is not always the same, since it is done inside a function that is passed a parameter indicating if you want to…
jstechg
  • 123
  • 1
  • 2
  • 10
0
votes
1 answer

Difficulty creating Spdlog asynchronous file logger

I am trying to make a logger for my application which doesn't run in the main thread. I am using a wrapper class, Logger, around spdlog. The class has a private static data member of type std::shared_ptr which gets initialized in an…
Kejoko
  • 11
  • 1
  • 3
0
votes
0 answers

How do you set up spdlog?

I have added a git-submodule for spdlog, and when I try including it like so: #include "spdlog/include/spdlog/spdlog.h" I get errors: spdlog/include/spdlog/spdlog.h:12:10: fatal error: spdlog/common.h: No such file or directory #include…
MaximV
  • 155
  • 11
0
votes
1 answer

Pointer macros are not functioning

I am making a logging system for an engine I am building and have run into an issue. I set up a number of macros for my engine but unfortunately, they don't seem to work. here is my code: Log.cpp #include "Log.h" #include…
user19273
  • 108
  • 9
0
votes
1 answer

how to print std::map with spdlog

int main() { std::map o; o["foo"] = "foo value"; spdlog::info(o); return 0; } Got error: static_assert failed due to requirement 'formattable' "Cannot format argument. To make type T formattable provide a…
langyu
  • 68
  • 1
  • 7
0
votes
1 answer

spdlog custom log tags

I would like to add some extra data to my log output depending on where it was logged. For instance I might have System A and System B, both spitting out log data, but perhaps I'm only interested in System B's log lines now so I could filter based…