Skip to content

Commit

Permalink
调整日志文件路径
Browse files Browse the repository at this point in the history
  • Loading branch information
hhyo committed Dec 1, 2019
1 parent 0daac43 commit b0babfa
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ assignees: ''

<!--请务必查看相关错误日志并贴出(这很关键),查看方式
```
/downloads/log/archery.log
/downloads/log/qcluster.log
/downloads/log/soar.log
/logs/archery.log
/logs/qcluster.log
/logs/soar.log
docker logs archery -f --tail=10
```
-->
Expand All @@ -49,4 +49,4 @@ docker logs archery -f --tail=10
一般建议使用release版本,其他都是非稳定版本
- 应用版本/分支:Release v1.4.5
- 部署方式:Docker、手工部署
-->
-->
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ docker restart archery

#日志查看和问题排查
docker logs archery -f --tail=10
/downloads/log/archery.log
logs/archery.log
```

#### 访问
Expand Down
22 changes: 15 additions & 7 deletions archery/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,15 @@
'default': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'downloads/log/archery.log',
'filename': 'logs/archery.log',
'maxBytes': 1024 * 1024 * 100, # 5 MB
'backupCount': 5,
'formatter': 'verbose',
},
'django-q': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'logs/qcluster.log',
'maxBytes': 1024 * 1024 * 100, # 5 MB
'backupCount': 5,
'formatter': 'verbose',
Expand All @@ -228,7 +236,7 @@
'level': 'DEBUG'
},
'django-q': { # django_q模块相关日志
'handlers': ['console', 'default'],
'handlers': ['console', 'django-q'],
'level': 'DEBUG',
'propagate': False
},
Expand All @@ -242,10 +250,10 @@
# 'level': 'DEBUG',
# 'propagate': False
# },
'django.request': { # 打印请求错误堆栈信息,方便开发
'handlers': ['console', 'default'],
'level': 'DEBUG',
'propagate': False
},
# 'django.request': { # 打印请求错误堆栈信息,方便开发
# 'handlers': ['console', 'default'],
# 'level': 'DEBUG',
# 'propagate': False
# },
}
}
File renamed without changes.
4 changes: 2 additions & 2 deletions qcluster_supervisord.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[supervisord]
logfile=downloads/log/supervisord.log ; (main log file;default /supervisord.log)
logfile=logs/supervisord.log ; (main log file;default /supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=downloads/log/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
pidfile=logs/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)
Expand Down
1 change: 1 addition & 0 deletions sql/sql_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def submit(request):
except Exception as msg:
logger.error(f"提交工单报错,错误信息:{traceback.format_exc()}")
context = {'errMsg': msg}
logger.error(traceback.format_exc())
return render(request, 'error.html', context)
else:
# 自动审核通过才进行消息通知
Expand Down
4 changes: 2 additions & 2 deletions src/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ configMap:
'default': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'downloads/log/archery.log',
'filename': 'logs/archery.log',
'maxBytes': 1024 * 1024 * 100, # 5 MB
'backupCount': 5,
'formatter': 'verbose',
Expand Down Expand Up @@ -391,7 +391,7 @@ configMap:
trace: false
# 日志级别,[0:Emergency, 1:Alert, 2:Critical, 3:Error, 4:Warning, 5:Notice, 6:Informational, 7:Debug]
log-level: 3
log-output: /opt/archery/downloads/log/soar.log
log-output: /opt/archery/logs/soar.log
# 优化建议输出格式
report-type: markdown
ignore-rules:
Expand Down
2 changes: 1 addition & 1 deletion src/docker-compose/archery/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
'default': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': 'downloads/log/archery.log',
'filename': 'logs/archery.log',
'maxBytes': 1024 * 1024 * 100, # 5 MB
'backupCount': 5,
'formatter': 'verbose',
Expand Down
2 changes: 1 addition & 1 deletion src/docker-compose/archery/soar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ profiling: false
trace: false
# 日志级别,[0:Emergency, 1:Alert, 2:Critical, 3:Error, 4:Warning, 5:Notice, 6:Informational, 7:Debug]
log-level: 3
log-output: /opt/archery/downloads/log/soar.log
log-output: /opt/archery/logs/soar.log
# 优化建议输出格式
report-type: markdown
ignore-rules:
Expand Down
1 change: 1 addition & 0 deletions src/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ services:
- "./archery/docs.md:/opt/archery/docs/docs.md"
- "./archery/downloads:/opt/archery/downloads"
- "./archery/sql/migrations:/opt/archery/sql/migrations"
- "./archery/logs:/opt/archery/logs"
entrypoint: "dockerize -wait tcp://mysql:3306 -wait tcp://redis:6379 -timeout 60s /opt/archery/src/docker/startup.sh"
environment:
NGINX_PORT: 9123
4 changes: 2 additions & 2 deletions src/plugins/soar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ profiling: false
trace: false
# 日志级别,[0:Emergency, 1:Alert, 2:Critical, 3:Error, 4:Warning, 5:Notice, 6:Informational, 7:Debug]
log-level: 7
log-output: /opt/archery/downloads/log/soar.log
log-output: /opt/archery/logs/soar.log
# 优化建议输出格式
report-type: markdown
ignore-rules:
Expand Down Expand Up @@ -43,4 +43,4 @@ explain-warn-scalability:
query: ""
list-heuristic-rules: false
list-test-sqls: false
verbose: true
verbose: true

0 comments on commit b0babfa

Please sign in to comment.