2012-12-17から1日間の記事一覧
プログラム実行中に発生したエラーを、error.logファイルに追記していきます。 import logging logging.basicConfig( level=logging.DEBUG, filename='error.log', filemode='a') try: x = 1 / 0 except Exception, exc: logging.exception(exc) raise ERROR…
プログラム実行中に発生したエラーを、error.logファイルに追記していきます。 import logging logging.basicConfig( level=logging.DEBUG, filename='error.log', filemode='a') try: x = 1 / 0 except Exception, exc: logging.exception(exc) raise ERROR…