logging messages from my program doesn't reach /var/log/messages
Hi,
I have a syslog-ng running and kernel build of 2.6.34.8 I use a syslog API in my program with facility LOG_LOCAL5 and and levels debug err and crit and info. when I ran on the older syslog facility I had everything logged fine as I intended. now I have written these rules into the syslog-ng.conf: options { flush_lines (0); time_reopen (10); log_fifo_size (1000); long_hostnames (off); use_dns (no); use_fqdn (no); create_dirs (no); keep_hostname (yes); }; source s_sys { file ("/proc/kmsg" program_override("kernel: ")); unix-stream ("/dev/log"); internal(); # udp(ip(0.0.0.0) port(514)); }; destination d_cons { file("/dev/console"); }; destination d_mesg { file("/var/log/messages"); }; destination d_auth { file("/var/log/secure"); }; destination d_mail { file("/var/log/maillog" flush_lines(10)); }; destination d_spol { file("/var/log/spooler"); }; destination d_boot { file("/var/log/boot.log"); }; destination d_cron { file("/var/log/cron"); }; destination d_mlal { usertty("*"); }; #filter f_filter1 { facility(kern); }; filter f_filter2 { level(info..emerg) and not facility(mail,authpriv,cron); }; filter f_filter3 { facility(authpriv); }; filter f_filter4 { facility(mail); }; filter f_filter5 { level(emerg); }; filter f_filter6 { facility(uucp) or (facility(news) and level(crit..emerg)); }; filter f_filter7 { facility(local7); }; filter f_filter8 { facility(cron); }; filter f_gnssapp { facility(local5) or level(info..emerg); }; filter f_gnssdbg { facility(local5) or level(debug); }; #log { source(s_sys); filter(f_filter1); destination(d_cons); }; #log { source(s_sys); filter(f_filter2); destination(d_mesg); }; log { source(s_sys); filter(f_filter3); destination(d_auth); }; log { source(s_sys); filter(f_filter4); destination(d_mail); }; log { source(s_sys); filter(f_filter5); destination(d_mlal); }; log { source(s_sys); filter(f_filter6); destination(d_spol); }; log { source(s_sys); filter(f_filter7); destination(d_boot); }; log { source(s_sys); filter(f_filter8); destination(d_cron); }; log { source(s_sys); filter(f_gnssapp) ; destination(d_mesg); }; log { source(s_sys); filter(f_gnssdbg) ; destination(d_mesg); }; the last two rules show my program gnssapp. the result is all debug levels or crit or err levels I don't see any of them ! any help is much appreciated |
Have you checked dmesg for the output?
Kevin Barry |
Yes, I don't have anything of tons of log messages I should have written with debug level in neither the /var/log/messages or in dmesg
|
Can you reproduce the problem with a small program you can post here?
Kevin Barry |
Sorry for the delayed answer.
I appreciate your help. but my mistake was that I had two syslog-ng.conf files in my system one of which that I updated was not in the right directory. kind of an amateur's mistake... Thanks again... |
All times are GMT -5. The time now is 12:16 AM. |