Skip to content

Commit 0c581fe

Browse files
committed
configure basic logging
1 parent c1ca85a commit 0c581fe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pytorch_lightning/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import logging as python_logging
44
import os
55
import time
6+
import sys
67

78
_this_year = time.strftime("%Y")
89
__version__ = '1.1.4'
@@ -37,10 +38,11 @@
3738
- https://pytorch-lightning.readthedocs.io/en/latest
3839
- https://pytorch-lightning.readthedocs.io/en/stable
3940
"""
40-
41-
_logger = python_logging.getLogger(__name__)
42-
_logger.addHandler(python_logging.StreamHandler())
43-
_logger.setLevel(python_logging.INFO)
41+
python_logging.basicConfig(
42+
stream=sys.stdout,
43+
format="%(message)s",
44+
level=python_logging.INFO,
45+
)
4446

4547
PACKAGE_ROOT = os.path.dirname(__file__)
4648
PROJECT_ROOT = os.path.dirname(PACKAGE_ROOT)

0 commit comments

Comments
 (0)