From fd38f6cef2e5d65a5ce1afec73a8925dcb2c5dee Mon Sep 17 00:00:00 2001 From: Marius Date: Tue, 20 Oct 2020 00:44:35 +0200 Subject: [PATCH] added logs to stdout --- geoip2influx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geoip2influx.py b/geoip2influx.py index 2613fa9..08909c1 100644 --- a/geoip2influx.py +++ b/geoip2influx.py @@ -34,7 +34,7 @@ log_level = env.get('GEOIP2INFLUX_LOG_LEVEL', 'info').upper() g2i_log_path = env.get('GEOIP2INFLUX_LOG_PATH','/config/log/geoip2influx/geoip2influx.log') # Logging -logging.basicConfig(level=log_level,format='%(asctime)s :: %(levelname)s :: %(message)s',datefmt='%d/%b/%Y %H:%M:%S',filename=g2i_log_path) +logging.basicConfig(level=log_level,format='GEOIP2INFLUX %(asctime)s :: %(levelname)s :: %(message)s',datefmt='%d/%b/%Y %H:%M:%S',handlers=[logging.StreamHandler(),logging.FileHandler(g2i_log_path)]) def regex_tester(log_path, N): time_out = time() + 60