Solved

dynamic redirection of log4c to syslog

Posted on 2013-11-18
3
409 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

691 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