Skip to content

Commit f0ce57b

Browse files
committed
fix(logging): add HPECP_LOG_CONF_FILE var
Signed-off-by: Chris Snow <[email protected]>
1 parent 6bd13e0 commit f0ce57b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hpecp/logger.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
# OTHER DEALINGS IN THE SOFTWARE.
2020

2121
import logging
22+
import logging.config
2223
import os
2324

2425

@@ -29,6 +30,9 @@ class Logger(object):
2930
@classmethod
3031
def get_logger(cls):
3132

33+
if "HPECP_LOG_CONF_FILE" in os.environ:
34+
logging.config.fileConfig(os.getenv("HPECP_LOG_CONF_FILE"))
35+
3236
format = (
3337
"%(asctime)s - %(filename)s "
3438
"- %(name)s - %(levelname)s - %(message)s"

0 commit comments

Comments
 (0)