Remove other refs to stdlib logging.

This commit is contained in:
Stephen Diehl
2012-07-06 10:47:11 -04:00
parent b9e0be6bf0
commit 7ffdff64a1
4 changed files with 6 additions and 13 deletions
-4
View File
@@ -2,14 +2,10 @@
Commonly used messaging components.
"""
import logging
import zipline.protocol as zp
from zipline.core.component import Component
from zipline.protocol import COMPONENT_TYPE
LOGGER = logging.getLogger('ZiplineLogger')
class DataSource(Component):
"""
Abstract baseclass for data sources. Subclass and implement send_all
+3 -3
View File
@@ -36,14 +36,14 @@ Risk Report
"""
import logging
import logbook
import datetime
import math
import numpy as np
import numpy.linalg as la
from zipline.utils.date_utils import epoch_now
LOGGER = logging.getLogger('ZiplineLogger')
log = logbook.Logger('Risk')
def advance_by_months(dt, jump_in_months):
month = dt.month + jump_in_months
@@ -255,7 +255,7 @@ class RiskMetrics():
cur_return = math.log(1.0 + r) + cur_return
#this is a guard for a single day returning -100%
except ValueError:
LOGGER.warn("{cur} return, zeroing the returns".format(cur=cur_return))
log.warn("{cur} return, zeroing the returns".format(cur=cur_return))
cur_return = 0.0
compounded_returns.append(cur_return)
+3 -3
View File
@@ -1,12 +1,12 @@
import pytz
import math
import logging
import logbook
import datetime
import zipline.protocol as zp
from zipline.protocol import SIMULATION_STYLE
LOGGER = logging.getLogger('ZiplineLogger')
log = logbook.Logger('Transaction Simulator')
class TransactionSimulator(object):
@@ -39,7 +39,7 @@ class TransactionSimulator(object):
log = "requested to trade zero shares of {sid}".format(
sid=event.sid
)
LOGGER.debug(log)
log.debug(log)
return
if not self.open_orders.has_key(event.sid):
-3
View File
@@ -1,12 +1,9 @@
import logging
from zipline.core.component import Component
import zipline.protocol as zp
from zipline.protocol import CONTROL_PROTOCOL, COMPONENT_TYPE, \
CONTROL_FRAME, CONTROL_UNFRAME
LOGGER = logging.getLogger('ZiplineLogger')
class BaseTransform(Component):
"""
Top level execution entry point for the transform