Log4c is a C library for flexible logging to files, syslog and other destinations. It is modeled after the log4j Java library.
Questions tagged [log4c]
15 questions
2
votes
0 answers
Log4C - Allowing multiple appenders per category
I am using Log4C and enjoy the functionality but is lacking one feature: Multiple appenders per category.
Quote from http://log4c.sourceforge.net/: "Future versions will handle multiple appenders per category".
I need to output a single log message…

tentacles1349
- 23
- 5
1
vote
2 answers
Creating a log file with current time
I am trying to do something similar to Appending current time to a new log file each time log4j is initialized.
I am using log4c for logging. I would like to be able to create a new log file with each execution of the application. Is it possible to…

bobby
- 2,629
- 5
- 30
- 56
1
vote
0 answers
log4c rollingpolicy append="true" not happening after calling log4c_fini()
As per our requirement we need to append the logs in a file until the given file size is reached.
before reaching the file size as set 100MB we need to call log4c_fini() and after this we are calling log4c_init().
at this moment a new file is…

Simon
- 11
- 2
1
vote
0 answers
CMake ExternalProject_add dependencies
I'm trying to build a project that includes log4c for the Jetson Nano. log4c is dependent on expat. expat has a CMakeLists.txt file and plays nicely with CMake. I'm having trouble telling log4c where the build output of expat lives to complete the…

Nick
- 258
- 4
- 14
1
vote
1 answer
log4c - how can I ONLY see INFO messages?
I am using the latest version of LOG4C and am a little confused why I cannot control the INFO, WARN, DEBUG statements coming out to the screen? I have used LOG4J and it seemed to be easy to control whether DEBUG, INFO , WARN messages came out.
Here…

Lynton Grice
- 1,435
- 3
- 29
- 45
1
vote
0 answers
log4c link error in eclipse
Been trying to use log4c in an eclipse IDE. No matter what I try, I can't seem to resolve the __log4c_category_vlog reference in my link.
I can see __log4c_category_vlog via an objdump of the liblog4c.a file, I've tried modifying some of the code in…

David B
- 11
- 3
1
vote
1 answer
C Simple Logging Management
I'm currently using the not so sophisticated printf method of logging; and I'm wondering whether to use something like "log4c" "zlog" or "syslog" to better manage ongoing debug/informational output. I'm not asking for a "best" library for the task;…

justinzane
- 1,897
- 1
- 26
- 38
1
vote
3 answers
Failed to use log4crc configuration file
I am trying to use log4c for my C application logging. For implementing rolling policy, I used log4c rolling file APIs. I understood from Log4C developers guide that the rolling policy could be achieved by editing the configuration file (log4crc). I…

Honey Sukesan
- 85
- 10
0
votes
0 answers
How to use Apache webserver to log or redirect logs to an external program without piped logging
I have a requirement where httpd needs to write logs to an external program .
If specified, nothing would be logged in the httpd.log and access.log files instead would be redirected , i am aware that the same can be accomplished using piped…

stackdoubts
- 1
- 2
0
votes
1 answer
Log4cxx Error. Please initialize the log4cxx system properly
I´m running an application on a red hat image of docker. I have some .sh files but when executing them on the logs files I see this error:
Log4cxx Please initialize the log4cxx system properly.
Log4cxx is already installed

flteam
- 11
- 3
0
votes
1 answer
log4c segmentation fault when calling rollingfile_udata_set_logdir
This is my code:
const char *logdir = ".";
const char *rollingpolicy_name = "rpolicy";
rollingfile_udata_t *rfup = NULL;
log4c_appender_t* app = NULL;
app = log4c_appender_get("rfileappender");
log4c_rollingpolicy_t *rollingpolicyp = NULL;
rfup =…

Rony Tesler
- 1,207
- 15
- 25
0
votes
0 answers
how to read logfile using log4c and print it
I have used log4c to write some logs to file, then I want to read the file,and show the logs at the terminal, but I can't find the API,If someone can help solve the problem,I will be very appreciated!!!

陈润泽
- 13
- 4
0
votes
1 answer
log4c doesn't print to logfiles when starting program as a service with systemd
I have an application that uses log4c for logging. It has been working well for the last few months of development. Today I wrote a systemd service file for this application to run on startup. Now log4c doesn't generate any log files. Here is my…

Nick
- 258
- 4
- 14
0
votes
1 answer
How to change log4c's default timezone?
I just installed log4c and log4c-devel on CentOS 6.x by yum. All works fine except the log time, it's slow for 8 hours
Following is the output of my machine:
[rafael@localhost ~]$ date
Tue Jan 14 15:17:34 CST 2014
Following is the log produced by…
0
votes
0 answers
log4c does not work in service mode
I'm new to linux C programming
And I am trying to write a service runnig on a CentOS host, log4c works as my logging module.
Everything works just fine during developing and debbugging, but when I finally install and run it as a service, no logs…

Sean
- 563
- 1
- 7
- 18