Mercurial > pylearn
changeset 1496:93b8373c6735
Prefix loggers with 'pylearn.' to ensure there is no conflict when using Pylearn code within another library
author | Olivier Delalleau <delallea@iro> |
---|---|
date | Mon, 22 Aug 2011 11:28:48 -0400 |
parents | 625fe86e3d5e |
children | 0f326860210e |
files | pylearn/algorithms/sparse_coding.py pylearn/dataset_ops/__init__.py pylearn/shared/layers/util.py |
diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/pylearn/algorithms/sparse_coding.py Wed Aug 17 10:18:59 2011 -0400 +++ b/pylearn/algorithms/sparse_coding.py Mon Aug 22 11:28:48 2011 -0400 @@ -152,8 +152,8 @@ if __name__ == '__main__': logging.basicConfig(stream=sys.stderr) - logging.getLogger('main').setLevel(logging.INFO) - logging.getLogger('main').info('hello') + logging.getLogger('pylearn.algorithms.sparse_coding.main').setLevel(logging.INFO) + logging.getLogger('pylearn.algorithms.sparse_coding.main').info('hello') # load olshausen images reproduce_olshausen()
--- a/pylearn/dataset_ops/__init__.py Wed Aug 17 10:18:59 2011 -0400 +++ b/pylearn/dataset_ops/__init__.py Mon Aug 22 11:28:48 2011 -0400 @@ -1,4 +1,4 @@ import logging -logging.getLogger('dataset_ops').setLevel(logging.INFO) +logging.getLogger('pylearn.dataset_ops').setLevel(logging.INFO) from protocol import Dataset, TensorDataset, TensorFnDataset # protocol.py
--- a/pylearn/shared/layers/util.py Wed Aug 17 10:18:59 2011 -0400 +++ b/pylearn/shared/layers/util.py Mon Aug 22 11:28:48 2011 -0400 @@ -27,7 +27,7 @@ """ if name is None: - name = "layers.%s" % cls.__name__ + name = "pylearn.shared.layers.%s" % cls.__name__ cls._logger = logging.getLogger(name) if level: try: