logging: Use generic saving

This commit is contained in:
Mykola Grymalyuk
2023-01-26 10:33:01 -07:00
parent 8becb554fc
commit e7727adcc6
3 changed files with 7 additions and 7 deletions
+3 -1
View File
@@ -33,12 +33,14 @@ class OpenCoreLegacyPatcher:
level=logging.NOTSET,
format="%(asctime)s - %(filename)s (%(lineno)d): %(message)s",
handlers=[
logging.FileHandler(f"Library/Logs/OpenCore-Patcher-v{self.constants.patcher_version}.log"),
# TODO: Handle proper file storage
logging.FileHandler(f"OpenCore-Patcher-v{self.constants.patcher_version}.log"),
logging.StreamHandler(),
],
)
logging.getLogger().handlers[1].setFormatter(logging.Formatter("%(message)s"))
logging.getLogger().setLevel(logging.INFO)
logging.getLogger().handlers[1].maxBytes = 1024 * 1024 * 10
def generate_base_data(self):
self.constants.detected_os = os_probe.detect_kernel_major()