Questions tagged [log4cxx]

Apache log4cxx is a logging framework for C++ patterned after Apache log4j. Apache log4cxx uses Apache Portable Runtime for most platform-specific code and should be usable on any platform supported by APR. Apache log4cxx is licensed under the Apache License, an open source license certified by the Open Source Initiative.

Apache log4cxx is a logging framework for C++ patterned after Apache log4j. Apache log4cxx uses Apache Portable Runtime for most platform-specific code and should be usable on any platform supported by APR. Apache log4cxx is licensed under the Apache License, an open source license certified by the Open Source Initiative.

Almost every large application includes its own logging or tracing API. Inserting log statements into code is a low-tech method for debugging it. It may also be the only way because debuggers are not always available or applicable. This is usually the case for multithreaded applications and distributed applications at large.

Experience indicates that logging is an important component of the development cycle. It offeres several advantages. It provides precise context about a run of the application. Once inserted into the code, the generation of logging output requires no human intervention. Moreover, log output can be saved in persistent medium to be studied at a later time. In addition to its use in the development cycle, a sufficiently rich logging package can also be viewed as an auditing tool.

Logging does have its drawbacks. It can slow down an application. If too verbose, it can cause scrolling blindness. To alleviate these concerns, log4cxx is designed to be reliable, fast and extensible. Since logging is rarely the main focus of an application, the log4cxx API strives to be simple to understand and to use.

Official Website: http://logging.apache.org/log4cxx/

Useful Links:

178 questions
3
votes
5 answers

Building log4cxx with APR

I need to build the log4cxx library on a SuSE linux system where I am not root. The package manager, zypper, apparently does not know about log4cxx. I download log4cxx and try to build with autotools ./configure checking for APR... no configure:…
clstaudt
  • 21,436
  • 45
  • 156
  • 239
3
votes
2 answers

How to set colour of console output of log4cxx?

I can find solution for log4j, but not for log4cxx.
poordeveloper
  • 2,272
  • 1
  • 23
  • 36
3
votes
1 answer

C++ Logger Performance and Portability

I'm writing a C++ application, that I have to deploy to a server in the future (maybe as a node.js C++ module). I really need a logging library that help me during the development process. Now I'm using log4cxx, but I need the code to be portable,…
Pablosproject
  • 1,374
  • 3
  • 13
  • 33
3
votes
0 answers

How do I fix build errors when trying to build 64 bit binaries of log4cxx?

I'm looking to compile and use log4cxx under Windows 7 64 bit, and would like to link it to a 64 bit application (I needed 32 bit binaries too, but I've found copies of those). I've found an "up to date" project that supposedly compiles under…
Chris Covert
  • 2,684
  • 3
  • 24
  • 31
2
votes
3 answers

Log4cxx DailyRollingFileAppender not rolling over

I have an application that only runs when triggered by hardware. An legacy c++ application that we recently added log4cxx too, to generate logs to help debug rare production issues. We of course wanted daily logfiles. It turns out that we never…
Shire
  • 639
  • 1
  • 14
  • 28
2
votes
1 answer

Log4cxx multiple output

I have log4cxx implementation in utility.dll. This dll is used by application1.dll and application2.dll Application1 defines log file name as "c:\application1\applog.log"; Application2 defines log file name as "c:\application2\applog.log". If I…
srajeshnkl
  • 883
  • 3
  • 16
  • 49
2
votes
1 answer

Rolling logs every 30 minutes

I'm using log4cxx and with the following configuration, I understand I can roll a log every hour, minute, day and so on.
DarthVader
  • 52,984
  • 76
  • 209
  • 300
2
votes
2 answers

Log4cpp compile error

I have the following code which is failing to compile. #include #include #include #include #define LOGFILE "./test.log" int main() { /*Setting up Appender,…
DarthVader
  • 52,984
  • 76
  • 209
  • 300
2
votes
1 answer

Failed to process package 'rosconsole':

I have installed ROS noetic on raspian buster but it get gives error when this command is implemented as per the procedure mentioned in http://wiki.ros.org/noetic/Installation/Source ./src/catkin/bin/catkin_make_isolated --install…
lari
  • 21
  • 2
2
votes
1 answer

Is it possible to configure spdlog from a file like log4j or log4cxx?

I have experience of log4j, and have used a port of it called log4net in c#. In both cases I find it very useful to configure loggers at run time, by means of logger config files. For example you can increase the log level of a particular subsystem…
Paulus
  • 1,385
  • 16
  • 20
2
votes
3 answers

log4cxx is throwing exception on ~Logger

I just started with log4cxx by doing a small app to get familiar with it. I compiled with Visual Studio 2005, no warnings or errors. Basically looks like : #includes<...> ... ... LoggerPtr logger(Logger::getLogger("MyApp")); void main(...) { …
Iuliu Atudosiei
  • 679
  • 1
  • 8
  • 14
2
votes
1 answer

Log4Cxx sql server appender

Is it possible, when using Log4Cxx, to write the logs to MS SQL server? I have been Googling for a while and have found a few examples that use the ODBCAppender. E.G.:
ninjaPixel
  • 6,122
  • 3
  • 36
  • 47
2
votes
1 answer

log4cxx: configuring appender with arguments

log4cxx's config is read from follow-by xml via: DOMConfigurator::configure("log4cxx.xml"); But, want to have filename set at runtime, and this creates a problem of either having multiple .xmls for reading, or creating one on the fly (in memory/at…
kagali-san
  • 2,964
  • 7
  • 48
  • 87
2
votes
0 answers

Deep copy appenders in log4cxx

I need to deep copy an appender in log4cxx however every appender has a private copy constructor and operator= so I can't do anything. At the same time I can call the method newInstance to create a default instance of the same class. How can I…
greywolf82
  • 21,813
  • 18
  • 54
  • 108
2
votes
1 answer

Does log4cxx::Level::getError() leak memory?

I use the log4cxx logging library in a project and Valgrind Memory Analyzer (in Qt Creator) to check for memory leaks. It appears to me that the log4cxx::Level::getError() and log4cxx::Level::getFatal() leak 18 bytes of memory. Here is the relevant…
FrozenTarzan
  • 834
  • 10
  • 30
1 2
3
11 12