mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-29 13:00:42 +08:00
Removes requirement of existence /var/log/zipline.log
Instead log to test.log in working directory when running tests. Also, removes config file for logging module, that is no longer used since we are now using LogBook.
This commit is contained in:
1 parent
aa0d3e06b1
commit
0c96915404
3 files changed
+2
-38
No files matched your search
@@ -16,6 +16,7 @@ pip-log.txt
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
.tox
|
||||
test.log
|
||||
|
||||
*.py[co]
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
[loggers]
|
||||
keys=root
|
||||
|
||||
[handlers]
|
||||
keys=consoleHandler,filesystemHandler
|
||||
|
||||
[formatters]
|
||||
keys=ziplineformat
|
||||
|
||||
# -------
|
||||
|
||||
[logger_root]
|
||||
level=DEBUG
|
||||
handlers=consoleHandler,filesystemHandler
|
||||
qualname=ZiplineLogger
|
||||
|
||||
# -------
|
||||
|
||||
[handler_filesystemHandler]
|
||||
class=handlers.RotatingFileHandler
|
||||
level=DEBUG
|
||||
formatter=ziplineformat
|
||||
args=("/var/log/zipline/zipline.log",'a',10*1024*1024,5)
|
||||
propagate=1
|
||||
|
||||
[handler_consoleHandler]
|
||||
class=StreamHandler
|
||||
level=ERROR
|
||||
formatter=ziplineformat
|
||||
args=(sys.stdout,)
|
||||
propagate=1
|
||||
|
||||
# -------
|
||||
|
||||
[formatter_ziplineformat]
|
||||
format=%(asctime)s %(levelname)s %(filename)s %(funcName)s - %(message)s
|
||||
datefmt=%Y-%m-%d %H:%M:%S %Z
|
||||
@@ -5,7 +5,7 @@ from itertools import izip
|
||||
from logbook import FileHandler
|
||||
|
||||
|
||||
def setup_logger(test, path='/var/log/zipline/zipline.log'):
|
||||
def setup_logger(test, path='test.log'):
|
||||
test.log_handler = FileHandler(path)
|
||||
test.log_handler.push_application()
|
||||
|
||||
|
||||
Reference in new issue
Block a user