def startLogging(console=True, filepath=None):
global logLevelFilterPredicate<EOL>observers = []<EOL>if console:<EOL><INDENT>observers.append( FilteringLogObserver(observer=textFileLogObserver(sys.stdout),  <EOL>predicates=[logLevelFilterPredicate] ))<EOL><DEDENT>if filepath is not None and filepath != "<STR_LIT>":<EOL><INDENT>observers.append( FilteringLogObserver(observer=textFileLogObserver(open(filepath,'<STR_LIT:a>')), <EOL>predicates=[logLevelFilterPredicate] ))<EOL><DEDENT>globalLogBeginner.beginLoggingTo(observers)<EOL>
Starts the global Twisted logger subsystem with maybe
stdout and/or a file specified in the config file