Questions tagged [log4cplus]

log4cplus is a C++ logging library.

log4cplus is a simple to use C++ logging API providing thread-safe, flexible, and arbitrarily granular control over log management and configuration.

It is modelled after the Java log4j API.

More info: Project page

136 questions
1
vote
0 answers

log4cplus RollingFileAppender BAD_ACCESS Error

thread #11: tid = 0x82c51, 0x30fc99f8 libsystem_c.dylib`flockfile, stop reason = EXC_BAD_ACCESS (code=1, address=0x38) frame #0: 0x30fc99f8 libsystem_c.dylib`flockfile frame #1: 0x30ffd690 libsystem_c.dylib`fseeko + 60 frame #2: 0x00205310…
Nishant
  • 136
  • 12
1
vote
1 answer

Undefined reference to Logger::getInstance() - but only in some cases

I'm using log4cplus (compiled from current git master), but i get undefined reference errors by the linker. However, these errors occur only at some classes. In general each class has the following form: Header (.h) // ... #include…
ollo
  • 24,797
  • 14
  • 106
  • 155
1
vote
0 answers

No need to finalize log4cplus? and new file with every run of the application?

I read some examples of log4cplus. But I've never found an example of finalization of log4cplus. So is there no need to finalize log4cplus by myself? log4cplus finalize by itself after an application finished.…
jef
  • 3,890
  • 10
  • 42
  • 76
1
vote
1 answer

How to link log4cplus.a in a shared library?

I try to create a shared library called "logtest.so" by linking "liblog4cplus.a" that I have compiled with -fPIC option on. Here is "logtest.cpp" (which is simply used for testing purpose by copying from log4cplus website): #include…
ALGO FE
  • 11
  • 3
1
vote
1 answer

Redefined error occured when mixed to use dcmtk-3.6.0 and log4cplus-1.1.2

I use dcmtk-3.6.0 to handle DICOM images, and use the log4cplus-1.1.2 as the logging library. The g++ compiler complained for the redefined error, because dcmtk-3.6.0 also used log4cplus with previous version as logging…
sfzhang
  • 669
  • 9
  • 18
1
vote
1 answer

How to set the thread_name in struct per_thread_data in log4cplus

I use log4cplus-1.1.2 in Linux. It seems that no way to set thread_name and thread_name2 in struct per_thread_data. The definition of struct per_thread_data as followed in file internal.h at line 111-130: //! Per thread data. struct…
sfzhang
  • 669
  • 9
  • 18
1
vote
1 answer

In log4cplus-1.1.2, why the type of Loger::value is NOT SharedLoggerImplPtr, but spi::LoggerImpl *?

I read the souce code of log4cplus-1.1.2 recently, and found that SharedLoggerImplPtr seem to be the better type for Loger::value than spi::LoggerImpl *。 The definition of Loger::value in logger.h at line 284-285: /** This is a pointer to the…
sfzhang
  • 669
  • 9
  • 18
1
vote
1 answer

log4cplus DailyRollingFileAppender daily rolling on midnight

I am using log4cplus to write the logs of my program. However, seems the DailyRollingFileAppender doesn't work as I expected. The log file is not rolled at midnight. Instead, the file is rolled when the first log message is written after midnight.…
mzzhmh
  • 79
  • 9
1
vote
1 answer

how to change log4cplus log file to utf8

I have been handed a code which uses log4cplus as the logger application. How can I generate a UTF8 logging file for it?. The logfile being created by log4cplus is in ASCII format at the moment. I have tried the follow Setting the file encoding of…
Manuj
  • 296
  • 1
  • 4
  • 13
1
vote
1 answer

Compiling log4cplus using MinGW

I have: - OS: WIndows 7 - MinGW, gcc 4.8.0. - MSYS 7.2 - Dowloaded log4cplus-1.1.1 from it's website . ./configure - done well. But at "make" I receive error with message "undefined reference Mutex::Mutex(Mutex::type)". I searched for ctors for that…
Arkady
  • 2,084
  • 3
  • 27
  • 48
1
vote
1 answer

Strange error message from JFileChooser

Whenever I display a JFileChooser dialog I get the following error message appearing on stderr: log4cplus:ERROR No appenders could be found for logger (AdSyncNamespace). log4cplus:ERROR Please initialize the log4cplus system properly. The error…
Jules
  • 14,841
  • 9
  • 83
  • 130
1
vote
1 answer

Firebreath won't compile using Xcode 5.0.2

I'm trying to build the OSX Firebreath plugin. It builds just fine if I set the target OS to 10.8, but if I try to move it back to 10.6, I get the following error message: /Users/dwiedeback/Github/plugin-dev/ …
Dan
  • 11
  • 3
1
vote
1 answer

Do I need to explicitly release the memory while using RollingFileAppender?

I am implementing the sample code of log4cplus in which I am using RollingFileAppender to store the log messages. My question is do I need to explicitly free the memory allocated by the following line by calling the destructor: SharedAppenderPtr…
Ankit
  • 1,330
  • 2
  • 11
  • 16
1
vote
2 answers

How to print method name in the log file using log4cplus

I have written a wrapper library on log4cplus. My library has LogMessage function inside which i am calling log4cplus library function to store the log message. eg. application.cpp int main() { LogMessage(DEBUG_LEVEL, __FILE__, __LINE__, "This is…
Ankit
  • 1,330
  • 2
  • 11
  • 16
1
vote
0 answers

JFileChooser causes log4cplus:ERROR No appenders could be found for logger (AdSyncNamespace)

Searching for a solution to a problem I am having with JFileChooser. It is the exact same problem as the one found here: https://forums.oracle.com/thread/2532293. If someone could give me a solution and explanation for the error that would be…