mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 14:50:29 +00:00
improve log level when status is 1 and 4 (#5446)
This commit is contained in:
@@ -103,9 +103,14 @@ def onlyoffice_editor_callback(request):
|
|||||||
|
|
||||||
doc_info = cache.get(doc_key)
|
doc_info = cache.get(doc_key)
|
||||||
if not doc_info:
|
if not doc_info:
|
||||||
logger.error('status {}: can not get doc_info from cache by doc_key {}'.format(status, doc_key))
|
if status not in (1, 4):
|
||||||
logger.info(post_data)
|
logger.error('status {}: can not get doc_info from cache by doc_key {}, post_data: {}'
|
||||||
return HttpResponse('{"error": 1}')
|
.format(status, doc_key, post_data))
|
||||||
|
return HttpResponse('{"error": 1}')
|
||||||
|
else:
|
||||||
|
# if the status is 1 and 4, the log level should not be error
|
||||||
|
logger.info('status {}: can not get doc_info from database by doc_key {}'.format(status, doc_key))
|
||||||
|
return HttpResponse('{"error": 1}')
|
||||||
else:
|
else:
|
||||||
logger.info('status {}: get doc_info {} from cache by doc_key {}'.format(status, doc_info, doc_key))
|
logger.info('status {}: get doc_info {} from cache by doc_key {}'.format(status, doc_info, doc_key))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user