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
0
votes
0 answers

Making a Calendar in C++

This is what I have so far. Can someone help me with my if statements, to get February to print with 29 days during a leap year? And also to get the first week of each month aligned correctly? Here's a screenshot. Like this:
0
votes
1 answer

Is this code correct to send logs to remote syslog server using log4cplus?

Can someone please tell me if this is correct way of using SysLogAppender of log4cplus ? I did not find a proper example for log4cplus. I need to send numerous logs to remote syslog server. main.cpp int main() { SysLogHelper syslogHelper; int…
aromahola
  • 190
  • 1
  • 12
0
votes
1 answer

Can't create folder that will contain the log file

I using log4cplus. I using config file (log4cplus.props) to define the appender. On the appender i want to create folder (in case its not exist ) that will contain all the log file …
Yanshof
  • 9,659
  • 21
  • 95
  • 195
0
votes
1 answer

Log4cplus: integrate regular expression in filters on gcc 4.8.5

Log4cplus has the spi::StringMatchFilter filter, which enables a simple matching of a string or sub-string to the log message (event message). I have gcc version 4.8.5 and what I would like to do is add to the Log4cplus the ability for filtering log…
N.avraham
  • 333
  • 2
  • 15
0
votes
1 answer

log4cplus: Dynamic loading configuration script, how to solve this problem?

when I use "ConfigureAndWatchThread" in main function, it's work int main() { ...... Logger root = Logger::getRoot(); log4cplus::ConfigureAndWatchThread configureThread("log4cplus.properties", 1 * 1000); ...... } buf, if I use…
0
votes
1 answer

Log4cplus: Does SocketAppender has an encrypting option?

I would like to use the SocketAppender for sending log messages to remote server, and I wonder- Does this SocketAppender has an encryption option and an option to send the log events through ssl?
N.avraham
  • 333
  • 2
  • 15
0
votes
1 answer

Log4cplus- How often does SocketAppender opens and closes the socket

I want to use Log4cplus SocketAppender to open TCP socket to a remote server and send events (log messages) to that server. Since my application has quite a lot of log messages to send, I wish to know - How often does the SocketAppender opens and…
N.avraham
  • 333
  • 2
  • 15
0
votes
1 answer

Can I use Log4cplus AsyncAppender on a self implemented appender-inheriting class?

I have implemented Appender inheriting class in Log4cplus, which on the Append() function- opens a TCP socket and sends the event log message to a remote server, and I am wondering: Can I make this self-implemented appender an asynchronous appender…
N.avraham
  • 333
  • 2
  • 15
0
votes
1 answer

log4cplus RollingFileAppender don't create new file

I using log4cplus in my project, the appender is RollingFileAppender , the problem is that when the size of the log file reach the MaxFileSize, then it don't create new log file and not rolling on the old file.my envirionment is Ubuntu 16.04.4 LTS,…
user10044988
  • 47
  • 1
  • 5
0
votes
1 answer

Log4cplus setproperty function usage

I use the following configuration for my logger, in the conf file : log4cplus.appender.TestLogAppender = log4cplus::TimeBasedRollingFileAppender log4cplus.appender.TestLogAppender.FilenamePattern =…
N.avraham
  • 333
  • 2
  • 15
0
votes
0 answers

Log4cplus not compiling as descirbed

#include #include #include #include #include #include #include int main(int argc, char*…
Karlovsky120
  • 6,212
  • 8
  • 41
  • 94
0
votes
1 answer

Log4cplus not formatting entries in the syslog and extra file

I want to make Log4cplus to format entries in the syslog and extra file so the severity will be first, like that: [ERROR] 2016-12-19 15:00:53.182Z [16538] int main(int, char**) | This is a ERROR message Such formatting, and any other changes,…
JacekG
  • 13
  • 5
0
votes
1 answer

How to use log4cplus in a custom singleton class

I configure this log4cplus' static object in my custom class LogCp's constructor function,and in this constructor I do write some test code and it can export the informations to a designated file correctly,but when I call the GetInstance fun…
TimGallin
  • 25
  • 6
0
votes
1 answer

Does log4cplus library supporting c++_shared runtime library for Android

i am compiling log4cplus library for android & it needs c++ runtime STL library. as per https://github.com/log4cplus/log4cplus/blob/master/android/android.toolchain.cmake line number: 835-837 are as follow: if( BUILD_WITH_ANDROID_NDK ) if( NOT…
Nishant
  • 136
  • 12
0
votes
0 answers

log4cplus- helpers::towstring() and PropertyConfigurator::doConfigure scramble string parameter in C++/CLI running in non-CLR mode for x64

I'm using log4cplus as a logger for both CLR and non-CLR C++/CLI code and C# code so for that reason I'm using the Unicode x64 build of log4cplus, log4cplusU.lib/dll. If I run the following code in a non-CLR C++/CLI x64 console application, I get a…
empty
  • 5,194
  • 3
  • 32
  • 58