Home  >  Magazine  >  #73 May 2000  >  Python Programming for Beginners  >  Listing 15. Writing to System Log
Wednesday, March 29, 2000 | Last Updated 03:43:20 PM


  

Listing 15. Writing to System Log

#! /usr/local/bin/python
import syslog
syslog.syslog('syslog junkie: the script has just got woken up')
# some code
for a in ['a', 'b', 'c']:
    b = 'syslog junkie: I found letter '+a
    syslog.syslog(b)
syslog.syslog('syslog junkie: the script goes to sleep now, bye,
bye!')