now errors before the bot actually starts up successfully are logged

This commit is contained in:
Jimmy Cao 2011-08-09 14:56:03 -05:00
parent cb9bdafc57
commit 8c03005a88

View File

@ -78,7 +78,7 @@ def __unhandled__(cli, prefix, cmd, *args):
def main():
if not botconfig.DEBUG_MODE:
logging.basicConfig(filename='errors.log', filemode='w', level=logging.WARNING)
logging.basicConfig(filename='errors.log', filemode='a', level=logging.WARNING)
else:
logging.basicConfig(level=logging.DEBUG)
@ -96,4 +96,7 @@ def main():
if __name__ == "__main__":
main()
try:
main()
except:
logging.error(traceback.format_exc())