提交 f3dfcc7b authored 作者: James Bergstra's avatar James Bergstra

Cleaned up logging functions in gof/cc

上级 511c4a94
...@@ -5,7 +5,7 @@ Defines Linkers that deal with C implementations. ...@@ -5,7 +5,7 @@ Defines Linkers that deal with C implementations.
# Python imports # Python imports
from copy import copy from copy import copy
import re #for set_compiledir import re #for set_compiledir
import os, sys, platform, StringIO, time import os, sys, platform, StringIO, time
import md5 import md5
if sys.version_info[:2] >= (2,5): if sys.version_info[:2] >= (2,5):
import hashlib import hashlib
...@@ -29,17 +29,14 @@ import cmodule ...@@ -29,17 +29,14 @@ import cmodule
import logging import logging
_logger=logging.getLogger("theano.gof.cc") _logger=logging.getLogger("theano.gof.cc")
_logger.setLevel(logging.WARN)
def info(*args): def info(*args):
#sys.stderr.write('INFO:'+ ' '.join(str(a) for a in args)+'\n')
_logger.info(' '.join(str(a) for a in args)) _logger.info(' '.join(str(a) for a in args))
def debug(*args): def debug(*args):
#sys.stderr.write('DEBUG:'+ ' '.join(str(a) for a in args)+'\n')
_logger.debug(' '.join(str(a) for a in args)) _logger.debug(' '.join(str(a) for a in args))
def warning(*args): def warning(*args):
sys.stderr.write('WARNING:'+ ' '.join(str(a) for a in args)+'\n')
_logger.warning(' '.join(str(a) for a in args)) _logger.warning(' '.join(str(a) for a in args))
def error(*args): def error(*args):
sys.stderr.write('ERROR:'+ ' '.join(str(a) for a in args)+'\n')
_logger.error(' '.join(str(a) for a in args)) _logger.error(' '.join(str(a) for a in args))
from theano.gof.callcache import CallCache from theano.gof.callcache import CallCache
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论