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

Trying to get FileAppender to Append to a file, not truncate and overwrite

OK, got log4cplus to log stuff to a file. Now I want it to simply append when the program re-starts instead of overwrite. I tried this: log4cplus::SharedAppenderPtr myAppender(new log4cplus::FileAppender "myLogFile.log",std::ios_base::ate)); but it…
OuttaCyTE
  • 21
  • 2
1
vote
1 answer

What happens with log4cplus after a fork()?

I'm working on a server and I want to be able to log messages using log4cplus. Up to here nothing too complicated. However, I use fork() to create a child process each time I receive a connection request. The fork() is to make sure that the child…
Alexis Wilke
  • 19,179
  • 10
  • 84
  • 156
1
vote
1 answer

log4cplus - how to configure logger child level to depend on its parent

Hey I'm trying the log4cplus (which is similar to log4j and therefore my tags) library. From the property file, is it possible to make a loggers level depend on its parents like this: If parent=INFO & child=WARN , child should log messages >=…
jaguzu
  • 528
  • 5
  • 14
1
vote
1 answer

Can I change the filename of a Log4Qt configuration at runtime?

I'm using Log4qt and I followed the official steps to configure a log file. I want to know if it's possible to change the configuration dynamically during runtime. Suppose the default file is "myapp.log" // Set logging level for Log4Qt to…
arthur86
  • 531
  • 1
  • 3
  • 20
1
vote
1 answer

log4cplus configuration file, file max size doesn't work

i have create a config file for log4cplus and its works but MaxFileSize don't do anything so my files keep growing without taking in considaration my limit . this is my code : ### logs.properties # root logger log4cplus.rootLogger=INFO, Main #…
Amine
  • 347
  • 1
  • 5
  • 12
1
vote
2 answers

Log4cplus char* and tstring issue with FileAppender

I have two projects with almost the same configuration in visual studio 2010 One with the console works and gives no trouble with the statement SharedAppenderPtr myAppender(new FileAppender("myLogFile.log")); While the other project a dll project…
Casper_2211
  • 1,075
  • 5
  • 14
  • 25
1
vote
1 answer

Can we achieve features like no message loss and no crash when we use log4cplu as client and rsyslog as server

We are planning to use log4cplus as client with syslog appender feature and using rsyslog as server ( both local system). I am not clear with syslog appender of log4cplus features. I would like to know if stack overflow, crash are avoidable or I…
1
vote
2 answers

Appender with multi-class example for logging system

I'm newbie working with a logging system, but it's something very useful to add to your programs. Summarizing my problem. I use the logging library log4cplus I doing and easy example with two simple classes and the main program. That's my error…
Jorge Vega Sánchez
  • 7,430
  • 14
  • 55
  • 77
1
vote
3 answers

Logger::getInstance causing bad_alloc exception in log4cplus

I'm attempting to implement logging in a c++ application using log4cplus. I'm able to successfully build/link (I added the log4cplus.lib to my additional libs and copied the log4cplus.dll to the build/outdir) When I run my application, I get the…
Josh
  • 834
  • 7
  • 13
0
votes
1 answer

log4cplus ConsoleAppender does not work in container

I'm trying to containerize my application but I'm having trouble getting log4cplus working. Bottom line up front, logging works when running on the host, but not in the container when I'm logging from long running loops. Its seems like a buffer…
0
votes
1 answer

Cygwin 3.3.4 random end of program

I'm looking for tips to find a direction where I have to investigate. I have a little c++ project that works well both on my old cygwin (3.0.4(0.338/5/3)) and on a debian distrib (thanks to Posix) In this project I use some libraries like log4cplus…
zzDiego
  • 37
  • 1
  • 8
0
votes
0 answers

log4cplus does not show all messages

We are building a module that is part of a full embedded Linux operating systems. We are using log4cplus for diagnostics. log.properties contains: log4cplus.logger.CompanyGlue=TRACE, console cm_bind_helper.h contains much more complicated than…
J-A-Brown
  • 85
  • 1
  • 3
  • 9
0
votes
1 answer

log4cplus::SocketAppender error when attempting to log a buffer with more than 8000 characters

I am attempting to log message via log4cplus::SocketAppender. These messages are serialized using google protobuf. I have no problem sending logs with small size. However, if I attempt to log messages with character length greater than 8000, I get…
Rishu Singh
  • 49
  • 1
  • 11
0
votes
1 answer

Log Something Once New File Is Created After Backup In Log4CPlus

Greeting I'm using the Log4CPlus library for logging. I want to log the application version and release date once the new log file is created after backup (DailyRollingFileAppender). How can I do that? This is how I configured my…
M.H.
  • 223
  • 3
  • 10
  • 23