updated log file path

moved logs into a path where they can easily be seen over http instead of logging into the docker host
This commit is contained in:
2023-03-23 13:19:03 -04:00
parent cf05ae8e34
commit c8f145b27b
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
ZVM Exporter Log files will be in this folder
+1 -1
View File
@@ -36,7 +36,7 @@ container_id = str(socket.gethostname())
#set log line format including container_id #set log line format including container_id
log_formatter = logging.Formatter("%(asctime)s;%(levelname)s;%(threadName)s;%(message)s", "%Y-%m-%d %H:%M:%S") log_formatter = logging.Formatter("%(asctime)s;%(levelname)s;%(threadName)s;%(message)s", "%Y-%m-%d %H:%M:%S")
log_handler = RotatingFileHandler(filename=f"../logs/Log-Main-{container_id}.log", maxBytes=1024*1024*100, backupCount=5) log_handler = RotatingFileHandler(filename=f"./logs/Log-Main-{container_id}.log", maxBytes=1024*1024*100, backupCount=5)
log_handler.setFormatter(log_formatter) log_handler.setFormatter(log_formatter)
log = logging.getLogger("Node-Exporter") log = logging.getLogger("Node-Exporter")