Browse Source

Now log messages goes to log file and screen will display only messages

bugfixes
gau1991 10 years ago
parent
commit
303db4635d
  1. 2
      config/ee.conf
  2. 3
      ee/core/logging.py

2
config/ee.conf

@ -27,7 +27,7 @@ file = /var/log/ee/ee.log
level = debug
### Whether or not to log to console
to_console = true
to_console = false
### Whether or not to rotate the log file when it reaches `max_bytes`
rotate = true

3
ee/core/logging.py

@ -14,7 +14,8 @@ class Log:
self.app.log.error(Log.FAIL + msg + Log.ENDC)
self.app.close(1)
def info(self, msg):
def info(self, msg, end='\n'):
print(Log.OKBLUE + msg + Log.ENDC, end=end)
self.app.log.info(Log.OKBLUE + msg + Log.ENDC)
def warn(self, msg):

Loading…
Cancel
Save