So im creating a game engine in accordance to thecherno's tutorial and I am adding GLFW Error handling(This is c++) and I cannot figure out where and how to add a formatter for SPDLOG
Here is my Log.h:
#define PL_CORE_TRACE(...) …
I made a logger using spdlog which I use all over my program. But I also want to flush everything to a log file when the program is completed. How can I achieve this? I'm new to spdlog and I couldn't find proper documentation suitable for my…
I'm new to spdlog and following a tutorial which looks like this:
Log.h
#pragma once
#include "spdlog/spdlog.h"
#include "spdlog/fmt/ostr.h"
namespace Engine{
class Log{
public:
static void init();
inline static…
I have the main application that uses boost log to output log to the console and library that uses spdlog to output to the console. Logs come from multiple threads. The question is how can I guarantee that the logs will not overlap each other
I want to use spdlog for my code's logging. In my code, there is a important variable for the step in simulation, and I want it to be always displayed in my logs.
Here is the format I wants.
[log_level][the_special_variable][logger_name]…
I'm occasionally seeing this in syslog:
[*** LOG ERROR #0027 ***] [2022-06-15 02:50:14] [MyApp] {argument index out of range}
But how do I figure out which line of code or function this is coming from? Does LOG ERROR mean it's coming from a call to…
I have a native library that uses spdlog for internal logging.
The library is compiled as shared library and the results .so files are then used in an Android project which has its own JNI and native c++ code which also uses spdlog.
The first time a…
I'm writing a wrapper for spdlog, so that I can change spdlog for a different lib if there will be a need. My problem is that I cannot pass to spdlof::log a const char*. I'm receiving an error saying that it 'message' is not a constant expression.…
I added logging capabilities to my application and it working fine.
However in one particular case it is crashing, and in that case I cannot see the logs.
Looks like my application is crashing before the log file is saved (I guess). Can I force…
So long story short, application is crashing.
I'm trying to use spdlog to inspect the situation but looks like application crashes before log file is saved,
so there is no log.
Thinking about it I can imagine this actually is normal behavior of…
My understanding of this is that the file will be limited to the specified size. But I don't understand the max_files = 3, are we going to
have one or three files?
I run the example here and got one file.
#include
#include…
I downloaded and followed the example 1.
Moved to example 2 (Create stdout/stderr logger object) and got stuck. Actually I can run it as it is but if I change
spdlog::get("console") to spdlog::get("err_logger") it crashes.
Am I supposed to change it…
I'm trying to open a file in pybind11 module and write something into it.
But FILE *fp = fopen("log/module_cc.log", "w"); will return NULL.
Would you please help me with that ?
Actually I'm trying to use spdlog for logging in pybind11 module, and it…
I'm trying to logging something in pybind11 modules with spdlog.
I add a static variable log_initializer, it's constructor will initialize spdlog.
Here's the sample code:
#include
PYBIND11_MODULE(my_module, m) {
// def my…
I am using spdlog to do some simple logging on a c++ program on a beaglebone, debian 10. I set up a rotating logger:
auto logger = spdlog::rotating_logger_mt("runtime_log", "~/logs/log.txt", max_size, max_files);
and this returns the error
terminate…