Esempio n. 1
0
 def __init__(self, channel, filename):
     self.channel = channel
     self.filename = filename
     conf = ConfigObj('pyGBot.ini')
     
     try:
         print "Opening log file..."
         log.addScreenHandler(log.logger, log.formatter)
         log.addLogFileHandler(log.logger,conf['IRC']['logfile'],log.formatter)
     except IOError, msg:
         print "Unable to open log file: ", msg
         print "Defaulting to local."
         log.addLogFileHandler(log.logger,'pyGBot.log',log.formatter)
Esempio n. 2
0
    def __init__(self, channel, filename):
        self.channel = channel
        self.filename = filename
        conf = ConfigObj('pyGBot.ini')

        try:
            print "Opening log file..."
            log.addScreenHandler(log.logger, log.formatter)
            log.addLogFileHandler(log.logger, conf['IRC']['logfile'],
                                  log.formatter)
        except IOError, msg:
            print "Unable to open log file: ", msg
            print "Defaulting to local."
            log.addLogFileHandler(log.logger, 'pyGBot.log', log.formatter)