471,350 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Syslog

Hi All,

Could anyone tell me how I could syslog to a specific log (e.g. /var/
log/daemon.log, /var/log/syslog.log...)?

Thanks very much in advance!

-Greg

Aug 21 '07 #1
2 1655
greg wrote:
Could anyone tell me how I could syslog to a specific log (e.g. /var/
log/daemon.log, /var/log/syslog.log...)?

Thanks very much in advance!
It's up to your syslogd to route messages into particular files, based
on their facility and/or priority. Check out /etc/syslog.conf or
equivalent on your system.
Hamish
Aug 21 '07 #2

On Aug 20, 2007, at 4:56 PM, greg wrote:
Hi All,

Could anyone tell me how I could syslog to a specific log (e.g. /var/
log/daemon.log, /var/log/syslog.log...)?
# something like this:

import logging
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)s %(levelname)-8s %(message)s',
datefmt='%a, %d %b %Y %H:%M:%S',
filename='/var/log/whatever.log',
filemode='a')

logging.info('random message')

hth,
Michael
---
# Something just doesn't seem right in those
# "Every kiss begins with 'K'" commercials.
>>'Every Kiss'.startswith('K')
False


Aug 23 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Erich Trowbridge | last post: by
5 posts views Thread by Micha³ Wo¼niak | last post: by
reply views Thread by Stephen Touset | last post: by
1 post views Thread by Gregory Starck | last post: by
8 posts views Thread by Guy Noir | last post: by
3 posts views Thread by Troels Arvin | last post: by
1 post views Thread by Lincoln Yeoh | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.