I have a project where I use the spdlog library. My header file looks like this:
#pragma once
#include
#include
#include
namespace vtek
{
void initialize_logging(const InitInfo* info);
void…
I'm using spdlog and trying to create a logger object to be shared between multiple source files. However, whenever I use the built in spdlog::get() function it results in a segmentation fault error.
foo.cpp
#include "bar.h"
#include…
I'm using spdlog in various C++ libraries for which Python bindings are created with pybind11.
Now I'm wondering if there is a nice way how I can configure these loggers (mostly the level and format) from the Python side.
Currently I am creating a…
I have a pretty simple application which send tcp log to promtail. (So promtail doesn't gaver data from file)
The problem is that the last log sent to protail isn't stored in loki until another log comes.
Let's say that I logged "foo", I'll see…
Following spdlog documentation I was able to modify the print pattern
#include "spdlog/spdlog.h"
#include "spdlog/sinks/daily_file_sink.h"
int main()
{
spdlog::set_pattern("%H:%M:%S.%e %t %s %! %v");
auto logger =…
I'm trying to combine two sinks:
auto console_sink = std::make_shared();
console_sink->set_level(spdlog::level::warn);
console_sink->set_pattern("[multi_sink_example] [%^%l%$] %v");
auto…
How can I avoid clang tidy warnings on my external library I am downloading using FetchContent. Is their an easy way to treat these as system libraries.
I have done this in the past with my own header lib that I wanted to ignore…
Ok so I hooked up the QTextEdit with spdlog. But how to get the colorized output from spdlog/fmt to show in the QTextEdit? Am I doomed to implement my own message handler for that to happen? Or is there a slicker way?
The code was compiling fine until the compiler shown that error. It's the second time that it happened to me, I didn't solved yet, I just copied a last version of my project when it happened for the first time. On both, it just appeared doing…
say we build our spdlog object as the following?
logger = std::make_shared("some name", sink_list.begin(), sink_list.end());
Is there a method such as logger->get_name() or anything else that would return "some name"
Spdlog appears to have a trancute upon construction of basic_file_sink_mt, but other then that there appears to be no method that can be called to clear the file. My current workaround is to reconstruct the basic_file_sink_mt object so that trancute…
I did a test with the {fmt} and was super easy to change background color, but I can't get the same with spdlog.
I can get the same result with spdlog, but is a weird code
fmt::print( bg( fmt::terminal_color::yellow ) | fg(…
I have an issue building my library for aarch64. Note that this code builds and runs fine when building for x86.
I have a macro:
#define LOG_WARN(logger, message, ...) if (logger) { logger->Warn(message, __VA_ARGS__); }
I use it in the code like…