I am getting a log error.  I am running ActiveState Python 2.4.3.  Any
help greatly appreciated.  Here is my code:

file.py
---------

def main()
     setupLogging()
     blah....

def setupLogging():
    global log
    log = logging.getLogger("ftp")
    formatter = logging.Formatter('%(name)-12s: %(levelname)-8s
%(message)s')

    log.setFormatter(formatter)
    log.setLevel(logging.DEBUG)

    fhnd = logging.FileHandler('py_mybase.log')
    fhnd.setLevel(logging.DEBUG)
    log.addHandler(fhnd)

My Error:
    log.setFormatter(formatter)
AttributeError: Logger instance has no attribute 'setFormatter'

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to