mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-17 21:24:40 +10:00
Sync docstrings comments
This commit is contained in:
@@ -26,7 +26,7 @@ class InitializeLoggingSupport:
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
def __init__(self):
|
||||
self.log_filename: str = "OpenCore-Patcher.log"
|
||||
self.log_filepath: Path = None
|
||||
|
||||
@@ -111,6 +111,10 @@ class InitializeLoggingSupport:
|
||||
|
||||
StreamHandler's format is used to mimic the default behavior of print()
|
||||
While FileHandler's format is for more in-depth logging
|
||||
|
||||
Parameters:
|
||||
log_to_file (bool): Whether to log to file or not
|
||||
|
||||
"""
|
||||
|
||||
logging.basicConfig(
|
||||
@@ -125,6 +129,7 @@ class InitializeLoggingSupport:
|
||||
logging.getLogger().handlers[0].setFormatter(logging.Formatter("%(message)s"))
|
||||
logging.getLogger().handlers[1].maxBytes = self.max_file_size
|
||||
|
||||
|
||||
def _attempt_initialize_logging_configuration(self):
|
||||
"""
|
||||
Attempt to initialize logging framework configuration
|
||||
@@ -160,6 +165,7 @@ class InitializeLoggingSupport:
|
||||
sys.excepthook = custom_excepthook
|
||||
threading.excepthook = custom_thread_excepthook
|
||||
|
||||
|
||||
def _restore_original_excepthook(self):
|
||||
"""
|
||||
Restore original traceback handlers
|
||||
|
||||
Reference in New Issue
Block a user