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
3
votes
2 answers

How to retrieve log entries using log4cplus?

log4cplus is powerful, but I don't know how to retrieve log entries with it? Are there any features? Any APIs or things like that provided by log4cplus? Thanks in advance.
hittlle
  • 31
  • 1
  • 2
3
votes
1 answer

How to configure Log4cplus Syslog Appender

I want to configure Log4cplus Syslog appender to log messages only under certain conditions, by configuring the Log4cplus config file. The conditions I want to configure are the followings: 1) use sync/Async sending of log messages to Syslog 2) log…
N.avraham
  • 333
  • 2
  • 15
3
votes
1 answer

How to specify ./configure's parameters '--includedir' and '--libdir' to cmake

Question about installing log4cplus. log4cplus has two way to make & install. ./configure && make && make install cmake xxx && make && make install When I use the 1st one, parameters --includedir=PATH and --libdir=PATH can be specified to…
vertextao
  • 63
  • 8
3
votes
1 answer

More verbose mode for included files in GCC

I am trying to compile someone else's project. I already managed to build it under windows, which means it's compilable, but now I'm struggling on Linux. Specifically I am getting errors for one file: #ifndef _LOGGER_H_2011_27_02_ #define…
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778
3
votes
2 answers

Can I use printf format when using log4cplus?

Does log4cplus gives an API to print in C-Style / printf format? Reason: I would like to use log4cplus in C code (in addition to C++) and don't want to prepare the string before hand.
DavidS
  • 2,160
  • 1
  • 19
  • 22
3
votes
1 answer

Logging from multiple processes to same log file with Log4Cplus (Windows)

The way some of our clients use our application is to install onto a network drive and then each user executes the exe on their local machine. Because of this we have multiple processes writing to the same log file. I've tested this configuration…
jmack20093
  • 63
  • 1
  • 4
3
votes
1 answer

log4cplus:ERROR Re-initializing default context after it has already been destroyed

I'm running Win32 application (it is unit test based on google test). At the end of the run, when test summary is printed, I've the following failure: log4cplus:ERROR Re-initializing default context after it has already been destroyed. The memory…
Pupsik
  • 741
  • 3
  • 8
  • 25
3
votes
2 answers

Write logs in html file using log4cplus in C++ linux

We are using Log4cplus to generate logs in our Linux based home appliance. These logs are currently available on the home appliance on which a web server is running. We also show this logfile through a web browser. However since the log file is text…
user3356106
  • 31
  • 1
  • 1
  • 5
3
votes
1 answer

log4cplus: DailyRollingFileAppender config/MaxBackupIndex not working

Using a log4cplus config file for a bash script that runs a dcmtk (DICOM toolkit) operation. Logging works, and creates a new log every minute that the script is running (per "minutely" in the config file). "minutely" is for testing purposes, where…
RichR
  • 395
  • 1
  • 4
  • 14
3
votes
1 answer

configuring the log4cplus ConversionPattern for different log level

i would like to configure different pattern for diff level on the same file e.g. INFO or DEBUG i dont need to show filename or line number conversionPattern=%d{%m/%d/%y %H:%M:%S} [%t] %-5p %c - %m %n WARN or FATAL - I need to show…
drategon
  • 73
  • 1
  • 8
3
votes
1 answer

Is Log4cplus RollingFileAppender Asynchronous or not

I'm going to add Log4cplus for our application. Our application is written in C++ and it is multithreaded. I want to use the Log4Cplus RollingFileAppender for the same. I know Log4Cplus was derived from Java Log4j. As I didn't know Java well, I have…
Prabu
  • 1,225
  • 4
  • 18
  • 26
3
votes
1 answer

How to use Log4Cplus in DLL

What is the best practice to use Log4Cplus in a DLL ? I want to use a FileAppender. I have a win32 DLL, that has DLLMain, and 3 exported Function. Where do I define the Appender and Layout object ? Where to set their properties ? Where do I link…
Dani
  • 14,639
  • 11
  • 62
  • 110
3
votes
2 answers

How do I output log messages using log4cplus in a format compatible with Chainsaw

I recently figured out how to output log4cplus messages in a format compatible with LogFactor5 in my C++ application: In my log4cplus.properties file I have the following appender defined: # LogFactor5…
kmccoy
  • 2,761
  • 3
  • 25
  • 29
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
2
votes
1 answer

How to create NTEventlogAppender.dll as required for logging event in the eventlog using log4cplus

First, Let me thank for the log4cplus source code. I am facing one issue as follows: What I am trying to do? I want to log the messages to event log on windows. What did I do? I could get the event logging enabled by in including following .h …
DeepakM
  • 61
  • 5
1
2
3
9 10