Skip to content

Commit

Permalink
忽略日志文件
Browse files Browse the repository at this point in the history
  • Loading branch information
mailgyc committed Feb 16, 2020
1 parent 8262553 commit 9e9d98a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.log
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
8 changes: 7 additions & 1 deletion doudizhu/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def database_url(url):
'disable_existing_loggers': False,
'root': {
'level': 'INFO',
'handlers': ['console'],
'handlers': ['console', 'file'],
'propagate': True,
},
'formatters': {
Expand All @@ -48,6 +48,12 @@ def database_url(url):
'class': 'logging.StreamHandler',
'formatter': 'verbose'
},
'file': {
'level': 'INFO',
'class': 'logging.FileHandler',
'filename': 'ddz.log',
'formatter': 'verbose'
},
}
}

Expand Down

0 comments on commit 9e9d98a

Please sign in to comment.