Changeset 377 for trunk


Ignore:
Timestamp:
06/13/07 16:14:05 (17 years ago)
Author:
bastiaans
Message:

jobmond/jobmond.py:

  • bugfixes to syslog code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jobmond/jobmond.py

    r373 r377  
    124124        DAEMONIZE       = cfg.getboolean( 'DEFAULT', 'DAEMONIZE' )
    125125
     126        SYSLOG_LEVEL    = -1
     127        SYSLOG_FACILITY = None
     128
    126129        try:
    127130                USE_SYSLOG      = cfg.getboolean( 'DEFAULT', 'USE_SYSLOG' )
     
    133136                debug_msg( 0, 'ERROR: no option USE_SYSLOG found: assuming yes' )
    134137
     138
    135139        if USE_SYSLOG:
    136140
     
    147151                        SYSLOG_FACILITY = eval( 'syslog.LOG_' + cfg.get( 'DEFAULT', 'SYSLOG_FACILITY' ) )
    148152
    149                 except AttributeError, detail:
     153                except ConfigParser.NoOptionError:
    150154
    151155                        SYSLOG_FACILITY = syslog.LOG_DAEMON
     
    960964        """Print msg if at or above current debug level"""
    961965
     966        global DAEMONIZE, DEBUG_LEVEL, SYSLOG_LEVEL
     967
    962968        if (not DAEMONIZE and DEBUG_LEVEL >= level):
    963969                sys.stderr.write( msg + '\n' )
Note: See TracChangeset for help on using the changeset viewer.