Solved

dynamic redirection of log4c to syslog

Posted on 2013-11-18
3
390 Views
Last Modified: 2013-11-20
Hi Experts,
Is there a way to change the "appender" in log4c to change dynamically.  Lets say my system is currently logging to file appender and I wanted to change it to switch to syslog without restarting it.  Is it possible?
0
Comment
Question by:ambuli
  • 2
3 Comments
 

Author Comment

by:ambuli
ID: 39657644
In case it is not possible, how can I add this functionality
0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 39660387
Haven't tried that, but shoudn't

log4c_category_set_appender(log4c_category_get("log4c.myapp"),log4c_appender_get("syslog"));

Open in new window


do that?
0
 

Author Closing Comment

by:ambuli
ID: 39662974
Yes - After posting this question I tried it and it worked.  thank you!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now