"Christmas - the time to fix the computers of your loved ones" « Lord Wyrm

[HELP] syslog umleiten in eine andere Datei

Hulk2442 06.12.2006 - 16:53 693 0
Posts

Hulk2442

Addicted
Avatar
Registered: Oct 2002
Location: AT
Posts: 554
HI
Ich benötige unter Linux (C++) ein Umleitung des normalen syslog Befehls in eine andere Datei weis jedoch nicht so wirklich wie ich das anstellen soll!

Programm Aufruf:
...
openlog("controller", LOG_PID|LOG_CONS|LOG_NDELAY, LOG_USER);
syslog(LOG_INFO, "Meine NAchricht");
closelog();
...

syslog-ng.conf erweiterung
filter f_controller { level(notice) and facility(controllerpriv); };
und unten
#
# All Controller messages:
#
destination controller { file("/var/log/controller" fsync(yes)); };
log { source(src); filter(f_controller); destination(controller); };
Bin mir jedoch nicht sicher ob syslog-ng.conf überhaupt erweitert werden muß und noch dazu in dieser Form.

Bin für jede Hilfe sehr Dankbar
TIA
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz