Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
785cc041
Commit
785cc041
authored
Feb 20, 2019
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改gunicorn日志
parent
6f19fcb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
settings.py
apps/jumpserver/settings.py
+12
-4
No files found.
apps/jumpserver/settings.py
View file @
785cc041
...
@@ -191,6 +191,9 @@ LOGGING = {
...
@@ -191,6 +191,9 @@ LOGGING = {
'simple'
:
{
'simple'
:
{
'format'
:
'
%(levelname)
s
%(message)
s'
'format'
:
'
%(levelname)
s
%(message)
s'
},
},
'msg'
:
{
'format'
:
'
%(message)
s'
}
},
},
'handlers'
:
{
'handlers'
:
{
'null'
:
{
'null'
:
{
...
@@ -220,15 +223,20 @@ LOGGING = {
...
@@ -220,15 +223,20 @@ LOGGING = {
'backupCount'
:
7
,
'backupCount'
:
7
,
'filename'
:
ANSIBLE_LOG_FILE
,
'filename'
:
ANSIBLE_LOG_FILE
,
},
},
'gunicorn_
logs
'
:
{
'gunicorn_
file
'
:
{
'encoding'
:
'utf8'
,
'encoding'
:
'utf8'
,
'level'
:
'DEBUG'
,
'level'
:
'DEBUG'
,
'class'
:
'logging.handlers.RotatingFileHandler'
,
'class'
:
'logging.handlers.RotatingFileHandler'
,
'formatter'
:
'm
ain
'
,
'formatter'
:
'm
sg
'
,
'maxBytes'
:
1024
*
1024
*
100
,
'maxBytes'
:
1024
*
1024
*
100
,
'backupCount'
:
2
,
'backupCount'
:
2
,
'filename'
:
GUNICORN_LOG_FILE
,
'filename'
:
GUNICORN_LOG_FILE
,
},
},
'gunicorn_console'
:
{
'level'
:
'DEBUG'
,
'class'
:
'logging.StreamHandler'
,
'formatter'
:
'msg'
},
},
},
'loggers'
:
{
'loggers'
:
{
'django'
:
{
'django'
:
{
...
@@ -267,8 +275,8 @@ LOGGING = {
...
@@ -267,8 +275,8 @@ LOGGING = {
'level'
:
"INFO"
,
'level'
:
"INFO"
,
},
},
'gunicorn'
:
{
'gunicorn'
:
{
'handlers'
:
[
'
console'
,
'gunicorn_logs
'
],
'handlers'
:
[
'
gunicorn_console'
,
'gunicorn_file
'
],
'level'
:
LOG_LEVEL
,
'level'
:
'INFO'
,
},
},
# 'django.db': {
# 'django.db': {
# 'handlers': ['console', 'file'],
# 'handlers': ['console', 'file'],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment