File tree Expand file tree Collapse file tree 4 files changed +390
-198
lines changed
Expand file tree Collapse file tree 4 files changed +390
-198
lines changed Original file line number Diff line number Diff line change 11# Copyright 2024 Broadcom. All Rights Reserved.
22# SPDX-License-Identifier: BSD-2-Clause
33
4+ # Standard library imports.
45import logging
5- import constants
66import os
77
8+ # Local application imports.
9+ import constants
10+
811logger = logging .getLogger (__name__ )
912logger .setLevel (logging .DEBUG )
1013if not os .path .exists (constants .LOG_PATH ):
1114 os .makedirs (constants .LOG_PATH )
12- formatter = logging .Formatter ('%(asctime)s %(levelname)s %(message)s' , datefmt = "%Y-%m-%dT%I:%M:%S" )
13- File_Handler = logging .FileHandler ('{}{}' .format (constants .LOG_PATH , constants .LOG_FILE_NAME ))
15+ formatter = logging .Formatter (
16+ "%(asctime)s %(levelname)s %(message)s" , datefmt = "%Y-%m-%dT%I:%M:%S"
17+ )
18+ File_Handler = logging .FileHandler (
19+ "{}{}" .format (constants .LOG_PATH , constants .LOG_FILE_NAME )
20+ )
1421File_Handler .setFormatter (formatter )
1522logger .addHandler (File_Handler )
1623Stream_Handler = logging .StreamHandler ()
Original file line number Diff line number Diff line change 11# Copyright 2024 Broadcom. All Rights Reserved.
22# SPDX-License-Identifier: BSD-2-Clause
33
4- LOG_PATH = ' ./logs/'
5- LOG_FILE_NAME = ' imaging.log'
6- ESXI_CDROM_MOUNT_DIR = ' ./esxi_cdrom_mount'
4+ LOG_PATH = " ./logs/"
5+ LOG_FILE_NAME = " imaging.log"
6+ ESXI_CDROM_MOUNT_DIR = " ./esxi_cdrom_mount"
You can’t perform that action at this time.
0 commit comments