Skip to content

Commit 04adff5

Browse files
committed
Fix logging module when using colorlog
1 parent e5d19b2 commit 04adff5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

formulate/logging.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
# Licensed under a 3-clause BSD style license, see LICENSE.
2+
from __future__ import absolute_import
3+
from __future__ import division
4+
from __future__ import print_function
5+
6+
import logging
7+
8+
29
__all__ = [
310
'logger'
411
]
512

13+
614
LOGGER_NAME = 'formulate'
715

816
try:
@@ -14,8 +22,6 @@
1422
logger = colorlog.getLogger(LOGGER_NAME)
1523
logger.addHandler(handler)
1624
except ImportError:
17-
import logging
18-
1925
logging.basicConfig()
2026
logger = logging.getLogger(LOGGER_NAME)
2127

0 commit comments

Comments
 (0)