Category : logging

I’ve inherited a C++ project that uses log4cpp for its logging. It’s been compiling and working fine, except that after the last build the following function that is called from a DllMain is hanging in a dead loop: void init_logger() { if (log4cpp::Category::getRoot().getAllAppenders().empty()) // <— hang happens here { configure_logger(); } } And the DllMain ..

Read more

Someone posed a question to me, they have a preexisting project, there is a variable that isnt behaving correctly and is causing memory issues, how can I help. So I wanted to test a theory of mine where I created a basic templated class with a overloaded = operator to monitor any modification to the ..

Read more

I am using libaio library to write to a file on disk using c++. I am using g3log for logging messages and have initialized the logger like this : auto log_worker = g3::LogWorker::createLogWorker(); auto sink_handle = log_worker->addSink(std::make_unique<CustomSink>(), &CustomSink::forwardLogToStdout); g3::initializeLogging(log_worker.get()); I have created a custom class like this: class CustomSink{ public: void forwardLogToStdout(g3::LogMessageMover logEntry) { std::cout<<logEntry.get().message()<<"n"; ..

Read more

I want to use the blake3 algorithm b3sum from GitHub here: https://github.com/BLAKE3-team/BLAKE3/releases/tag/1.0.0 I am using it with Windows. B3SUM will generate hashes and I output them to a log file simply with log redirect: b3sum C:test*.* > testhash.txt with output: effe226eb5d962ce3ff87772b9654037c047da0b0ad432bca78db84e9806e251 C:/test/testf.bat 0bd8963ba9b567c26f2e5b644874f58b67411d09ad42ef11899fa4dbca88564e C:/test/testf2.bat d049261aeee23c9167e5d125ccd384fb8e0bb90b7fb206b904fd666a8167194f C:/test/testf3.bat 5460dd7aec9823ac3dedc64806b40f167d4c11b6d8cd43b756a9bfdb93504836 C:/test/testf4.bat I go to verify the file checksum ..

Read more