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:
Eddie Hebert
2012-10-12 11:27:42 -04:00
parent aa0d3e06b1
commit 0c96915404
3 changed files with 2 additions and 38 deletions
+1
View File
@@ -16,6 +16,7 @@ pip-log.txt
# Unit test / coverage reports
.coverage
.tox
test.log
*.py[co]
-37
View File
@@ -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
+1 -1
View File
@@ -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()