mirror of
https://github.com/Novattz/creamlinux-installer.git
synced 2026-01-31 07:42:52 -05:00
seperate log files
This commit is contained in:
@@ -11,6 +11,7 @@ import logging
|
|||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
LOG_FILE = 'script.log'
|
LOG_FILE = 'script.log'
|
||||||
|
DEBUG_FILE = 'debug_script.log'
|
||||||
LOOP_THRESHOLD = 5 # Number of times a directory can be visited before considered a loop
|
LOOP_THRESHOLD = 5 # Number of times a directory can be visited before considered a loop
|
||||||
TIMEOUT = 180 # Timeout in seconds (3 minutes)
|
TIMEOUT = 180 # Timeout in seconds (3 minutes)
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ def setup_logging(debug):
|
|||||||
log_format = '%(asctime)s [%(levelname)s] %(message)s'
|
log_format = '%(asctime)s [%(levelname)s] %(message)s'
|
||||||
date_format = '%m-%d %H:%M:%S'
|
date_format = '%m-%d %H:%M:%S'
|
||||||
if debug:
|
if debug:
|
||||||
logging.basicConfig(filename=LOG_FILE, level=logging.DEBUG, format=log_format, datefmt=date_format)
|
logging.basicConfig(filename=DEBUG_FILE, level=logging.DEBUG, format=log_format, datefmt=date_format)
|
||||||
else:
|
else:
|
||||||
logging.basicConfig(filename=LOG_FILE, level=logging.ERROR, format=log_format, datefmt=date_format)
|
logging.basicConfig(filename=LOG_FILE, level=logging.ERROR, format=log_format, datefmt=date_format)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user