Hello , i want all my log messages from python to have in /var/log/python
Now they are in /var/log/messages:
Jun 9 12:10:51 sx1 kernel: klogd 1.4.1, log source = /proc/kmsg started. Jun 9 12:11:01 sx1 python: MM_MEMBERS [it] Nothing to do. Jun 9 12:11:02 sx1 python: MM_MEMBERS [research] Nothing to do. Jun 9 12:12:01 sx1 python: MM_MEMBERS [it] Nothing to do. Jun 9 12:12:01 sx1 python: MM_MEMBERS [research] Nothing to do.
So i have added to the end of the syslog.conf
# Python python.* /var/log/python
and restarted syslog,
then i have created /var/log/python and for sure addedd u+rw, g +rw, o+rw permissions
But, nothing, /var/log/python is empty
What am i doing wrong? (Centos 5.1)
Thanks
man syslog.conf will explain ;)
auth, authpriv, cron, daemon, kern, lpr, mail, mark, news, security (same as auth), syslog, user, uucp and local0 through local7 are the supported facilyties.. python(.*) is not ;)
Good luck.
Cheers,
Bart
----- Original Message ----- From: "David Hláčik" david@hlacik.eu To: "CentOS mailing list" centos@centos.org Sent: Monday, June 9, 2008 12:14:26 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [CentOS] syslog - python
Hello , i want all my log messages from python to have in /var/log/python
Now they are in /var/log/messages:
Jun 9 12:10:51 sx1 kernel: klogd 1.4.1, log source = /proc/kmsg started. Jun 9 12:11:01 sx1 python: MM_MEMBERS [it] Nothing to do. Jun 9 12:11:02 sx1 python: MM_MEMBERS [research] Nothing to do. Jun 9 12:12:01 sx1 python: MM_MEMBERS [it] Nothing to do. Jun 9 12:12:01 sx1 python: MM_MEMBERS [research] Nothing to do.
So i have added to the end of the syslog.conf
# Python python.* /var/log/python
and restarted syslog,
then i have created /var/log/python and for sure addedd u+rw, g +rw, o+rw permissions
But, nothing, /var/log/python is empty
What am i doing wrong? (Centos 5.1)
Thanks _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Thanks a lot,
so how can i relalize it? :)
D.
On Mon, Jun 9, 2008 at 1:01 PM, centos@bartbaars.nl wrote:
man syslog.conf will explain ;)
auth, authpriv, cron, daemon, kern, lpr, mail, mark, news, security (same as auth), syslog, user, uucp and local0 through local7 are the supported facilyties.. python(.*) is not ;)
Good luck.
Cheers,
Bart
----- Original Message ----- From: "David Hláčik" david@hlacik.eu To: "CentOS mailing list" centos@centos.org Sent: Monday, June 9, 2008 12:14:26 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [CentOS] syslog - python
Hello , i want all my log messages from python to have in /var/log/python
Now they are in /var/log/messages:
Jun 9 12:10:51 sx1 kernel: klogd 1.4.1, log source = /proc/kmsg started. Jun 9 12:11:01 sx1 python: MM_MEMBERS [it] Nothing to do. Jun 9 12:11:02 sx1 python: MM_MEMBERS [research] Nothing to do. Jun 9 12:12:01 sx1 python: MM_MEMBERS [it] Nothing to do. Jun 9 12:12:01 sx1 python: MM_MEMBERS [research] Nothing to do.
So i have added to the end of the syslog.conf
# Python python.* /var/log/python
and restarted syslog,
then i have created /var/log/python and for sure addedd u+rw, g +rw, o+rw permissions
But, nothing, /var/log/python is empty
What am i doing wrong? (Centos 5.1)
Thanks _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
David Hláèik wrote on Mon, 9 Jun 2008 13:12:13 +0200:
so how can i relalize it? :)
Probably not at all. You would have to redirect .err or .warn for a facility, but this would redirect all other input to that channel as well. You can change facilities for some applications, but I don't know if Python allows this. What you could do, is extract all python stuff from the messages log regularly. I don't have a recommendation for such a program. If your purpose is to get rid of the python messages in messages that would still not achieve this ...
Kai
Try syslog-ng...
It has much better filtering facilities..
Cheers,
Bart
----- Original Message ----- From: "Kai Schaetzl" maillists@conactive.com To: centos@centos.org Sent: Monday, June 9, 2008 1:51:40 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Re: [CentOS] syslog - python
David Hláèik wrote on Mon, 9 Jun 2008 13:12:13 +0200:
so how can i relalize it? :)
Probably not at all. You would have to redirect .err or .warn for a facility, but this would redirect all other input to that channel as well. You can change facilities for some applications, but I don't know if Python allows this. What you could do, is extract all python stuff from the messages log regularly. I don't have a recommendation for such a program. If your purpose is to get rid of the python messages in messages that would still not achieve this ...
Kai
On Mon, Jun 9, 2008 at 8:18 AM, centos@bartbaars.nl wrote:
Try syslog-ng...
It has much better filtering facilities..
Not to disparage syslog-ng, but you may want to check out rsyslog. It'll very likely be the default in centos6, and is currently the default in fedora. You can check the fedora reasoning here -> http://fedoraproject.org/wiki/Releases/FeatureRsyslog
On Mon, Jun 9, 2008 at 2:29 PM, Jim Perrin jperrin@gmail.com wrote:
On Mon, Jun 9, 2008 at 8:18 AM, centos@bartbaars.nl wrote:
Try syslog-ng...
Not to disparage syslog-ng, but you may want to check out rsyslog. It'll very likely be the default in centos6, and is currently the default in fedora. You can check the fedora reasoning here -> http://fedoraproject.org/wiki/Releases/FeatureRsyslog
As a sneak preview I can already tell you that CentOS 5.2 already will have rsyslog instead of the old plain syslog.
Regards, Tim
On Mon, Jun 9, 2008 at 8:31 AM, Tim Verhoeven tim.verhoeven.be@gmail.com wrote:
As a sneak preview I can already tell you that CentOS 5.2 already will have rsyslog instead of the old plain syslog.
I know it's in 5.2, I just didn't realize it was replacing syslog already. Thanks for the heads up :-P
2008/6/9 David Hláčik david@hlacik.eu:
Thanks a lot,
so how can i relalize it? :)
Doesn't help you now, but rsyslog has the ability to filter by regular expression in addition to the usual log facilities, and rsyslog will be in 5.2 when it gets released. So if you can wait until 5.2 comes out, you'll be able to filter the way you want.