forked from p34709852/monkey
Changed the log formatting a bit, added file and function name and line
numbers to the log string.
This commit is contained in:
parent
05c4bb7ac7
commit
509558fbb2
|
@ -3,7 +3,7 @@
|
||||||
"disable_existing_loggers": false,
|
"disable_existing_loggers": false,
|
||||||
"formatters": {
|
"formatters": {
|
||||||
"simple": {
|
"simple": {
|
||||||
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
"format": "%(asctime)s - %(filename)s:%(lineno)s - %(funcName)10s() - %(levelname)s - %(message)s"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import logging
|
||||||
from flask import request, jsonify
|
from flask import request, jsonify
|
||||||
import flask_restful
|
import flask_restful
|
||||||
|
|
||||||
|
@ -5,6 +6,8 @@ from cc.services.node import NodeService
|
||||||
|
|
||||||
__author__ = 'itay.mizeretz'
|
__author__ = 'itay.mizeretz'
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class ClientRun(flask_restful.Resource):
|
class ClientRun(flask_restful.Resource):
|
||||||
def get(self):
|
def get(self):
|
||||||
|
@ -17,6 +20,7 @@ class ClientRun(flask_restful.Resource):
|
||||||
if monkey is not None:
|
if monkey is not None:
|
||||||
is_monkey_running = not monkey["dead"]
|
is_monkey_running = not monkey["dead"]
|
||||||
else:
|
else:
|
||||||
|
logger.info("")
|
||||||
is_monkey_running = False
|
is_monkey_running = False
|
||||||
|
|
||||||
return jsonify(is_running=is_monkey_running)
|
return jsonify(is_running=is_monkey_running)
|
||||||
|
|
Loading…
Reference in New Issue