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
1
vote
1 answer

Using log4cxx for logging a particular class in C++

Following is my sample log4cxx configuration file which I use in my project - # Set root logger level to INFO and its only appender to A1. log4j.rootLogger=INFO, A1 # A1 is set to be a…
Onkar Deshpande
  • 301
  • 4
  • 15
1
vote
0 answers

moving from log4cxx to log4net

I have a largish application that currently uses log4cxx as its logging system. However, these appears to be a dead project, and I cannot get it to work with Visual Studio 2013. As such, I am looking to move to log4net Our project is a mixed C+/C#…
Simon Callan
  • 3,020
  • 1
  • 23
  • 34
1
vote
1 answer

log4cxx DOMConfigurator prints configuration information to the console

I'm working on a large project that uses several modules and plugins. We use log4cxx for logging in all of these modules and plugins. Each time log4cxx::xml::DOMConfigurator::configure("xml_config_file") is called, the configuration information is…
AceFunk
  • 684
  • 1
  • 8
  • 14
1
vote
1 answer

When Log4cxx write the logs into file?

When Log4cxx decides to write the logs it caches into the file (as configured previously), is it buffer based or timer based? Also, can I configure Log4cxx to write the logs when I send the logs to it not when it decides to ?
Sherif
  • 1,249
  • 4
  • 15
  • 38
1
vote
1 answer

What is a (the?) minimal logger.properties that turns off all logging?

I have an application that uses log4cxx internally, with dozens of loggers. What is a minimal logger.properties that I can setup to turn off all logging output? In particular I'm getting a warning like (no properties file present): log4cxx: No…
Dave
  • 7,555
  • 8
  • 46
  • 88
1
vote
1 answer

Log4cxx Logging statement hanging

We have a standlone VC++ application and we added logging using the log4cxx0.10.0 version. The application will initiate a thread (for some time consuming operation) and if it takes more than threshold time then the main thread will kill the thread…
Venkatesh
  • 334
  • 2
  • 11
1
vote
1 answer

Log4Cpp.properties file does not exist error

I have downloaded Log4Cpp code project and built succesfully on my windows 7 64 bit machine. I have also used properties file in my code in following way - const char* initFileName = "log4cpp.property"; …
user987316
  • 894
  • 4
  • 13
  • 35
1
vote
3 answers

C2252 Error when building log4cxx

Building in Visual Studio 2012, APR 1.4.8 APR-UTIL 1.5.2 Log4cxx 0.10 ran configure and configure-apr then open in VS and got 111 C2252 errors (it comes from a macro): // // pointer and list definition macros when building DLL using VC // #if…
Dani
  • 14,639
  • 11
  • 62
  • 110
1
vote
2 answers

Installing apr on Windows through MinGW, Python not detected

I'm trying to install log4cxx with MinGW on my Windows box but need to install apr and apr-util first. I've been following the guide on Apache's website and installed the version of Python they listed but get an error about Python not being found: $…
noko
  • 1,129
  • 2
  • 14
  • 25
1
vote
2 answers

log4cpp - Unhandled exception and access violation

Here is some example code I read from some tutorial: int main(int argc, char* argv[]) { log4cpp::OstreamAppender* osAppender = new log4cpp::OstreamAppender("osAppender", &cout); osAppender->setLayout(new log4cpp::BasicLayout()); …
CDT
  • 73
  • 7
1
vote
1 answer

Major difference between Apache log4cxx and log4cplus

I need to build my app which can make use of these c++ loggers. I am going through both the loggers(Apache log4cxx and log4cplus) I want to know the difference between the two. 1 thing which I have seen is Apache log4cxx make use of APR(Apache…
Ankit
  • 1,330
  • 2
  • 11
  • 16
1
vote
0 answers

Pantheios and Logger Hierarchy

I'm taking a look at a few logging libraries for my software. I've noticed that a lot of people recommend it and that it boasts some pretty good performance statistics. I know that the website claims that Pantheios can act as the top level layer…
anoneironaut
  • 1,778
  • 16
  • 28
1
vote
1 answer

Linker error when trying to link log4cxx into an Xcode ObjC/C++ program

I have been trying to link log4cxx into my ObjC/ObjC++/C++ project. It compiles but always fails at the link stage due to undefined symbols. By turning on the Xcode build option "Display Mangled Names" I was able to see why this is the case. The…
user2343223
1
vote
1 answer

linux c++ application deployment

I am trying to deploy a c++ application with log4cxx.so and is requiring glibc 2.14, but the machine being deploy has 2.12 glibc. Is is necessary to upgrade this machine to glibc 2.14 in order to run this application? Or there is other more portable…
Bryan Fok
  • 3,277
  • 2
  • 31
  • 59
1
vote
1 answer

How can I resolve single symbol link error when dynamically linking XCode project to lib4cxx library?

I'm writing in C++ under XCode 4.6 on Mountain Lion. I'm trying to add and use the Apache log4cxx library. I installed the library this morning via Brew. I'm linking against liblog4cxx.dylib. I'm getting a link error that just one symbol can't…