コード例 #1
0
ファイル: Logging.py プロジェクト: NeonOcean/S4.Debug
def _OnStart(cause: LoadingShared.LoadingCauses) -> None:
    global _preload, _loggingEnabled, _writeChronological, _writeGroups, _logLevel, _logInterval

    if cause != LoadingShared.LoadingCauses.Reloading:
        Patcher.Patch(log, "debug", _Debug)
        Patcher.Patch(log.Logger, "debug", _LoggerDebug)

        Patcher.Patch(log, "info", _Info)
        Patcher.Patch(log.Logger, "info", _LoggerInfo)

        Patcher.Patch(log, "warn", _Warning)
        Patcher.Patch(log.Logger, "warn", _LoggerWarning)

        Patcher.Patch(log, "error", _Error)
        Patcher.Patch(log.Logger, "error", _LoggerError)

        Patcher.Patch(log, "exception", _Exception)

    _UpdateSettings()
    Settings.RegisterOnUpdateCallback(_UpdateSettingsCallback)

    _preload = False
    _logger.Flush()

    Reporting.RegisterReportFileCollector(_DebugLogCollector)
コード例 #2
0
def _OnStart(cause: LoadingShared.LoadingCauses) -> None:
    Reporting.RegisterReportFileCollector(_GameFileStructureCollector)
コード例 #3
0
def _OnStart(cause: LoadingShared.LoadingCauses) -> None:
    Reporting.RegisterReportFileCollector(_PersistentCollector)
コード例 #4
0
def _OnStart(cause: LoadingShared.LoadingCauses) -> None:
    Reporting.RegisterReportFileCollector(_DebugLogCollector)