move logge def to global

This commit is contained in:
m0duspwnens
2025-01-09 16:14:57 -05:00
parent 6888682f92
commit ecc5d64584

View File

@@ -28,6 +28,13 @@ import configparser
from io import StringIO from io import StringIO
from so_logging_utils import setup_logging from so_logging_utils import setup_logging
# Set up logging using the so_logging_utils library
logger = setup_logging(
logger_name='so-qcow2-modify-network',
log_file_path='/opt/so/log/hypervisor/so-qcow2-modify-network.log',
log_level=logging.INFO,
format_str='%(asctime)s - %(levelname)s - %(message)s'
)
NETWORK_CONFIG_DIR = "/etc/NetworkManager/system-connections" NETWORK_CONFIG_DIR = "/etc/NetworkManager/system-connections"
@@ -161,13 +168,6 @@ def parse_arguments():
return args return args
def main(): def main():
# Set up logging using the so_logging_utils library
logger = setup_logging(
logger_name='so-qcow2-modify-network',
log_file_path='/opt/so/log/hypervisor/so-qcow2-modify-network.log',
log_level=logging.INFO,
format_str='%(asctime)s - %(levelname)s - %(message)s'
)
try: try:
args = parse_arguments() args = parse_arguments()