Пример #1
0
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 _OnStop(cause: LoadingShared.UnloadingCauses) -> None:
    global _exiting

    Settings.UnregisterOnUpdateCallback(_UpdateSettingsCallback)

    _logger.Flush()

    if cause == LoadingShared.UnloadingCauses.Exiting:
        _exiting = True

    Reporting.UnregisterReportFileCollector(_DebugLogCollector)
Пример #3
0
        def dialogCallback(closedDialog: ui_dialog.UiDialog) -> None:
            try:
                if closedDialog.response == gameUserDataReportResponseID:
                    Reporting.PrepareReportFiles(gameUserDataReportFilePath)
                    _ShowReportCreatedDialog()
                elif closedDialog.response == desktopReportResponseID:
                    Reporting.PrepareReportFiles(desktopReportFilePath)
                    _ShowReportCreatedDialog()
            except:
                commands.CheatOutput(
                    _connection
                )("Failed to run the callback for the prepare report location dialog."
                  )

                Debug.Log(
                    "Failed to run the callback for the prepare report location dialog.",
                    This.Mod.Namespace,
                    Debug.LogLevels.Exception,
                    group=This.Mod.Namespace,
                    owner=__name__)
Пример #4
0
def _OnStop(cause: LoadingShared.UnloadingCauses) -> None:
    Reporting.UnregisterReportFileCollector(_GameFileStructureCollector)
Пример #5
0
def _OnStart(cause: LoadingShared.LoadingCauses) -> None:
    Reporting.RegisterReportFileCollector(_GameFileStructureCollector)
Пример #6
0
def _OnStart(cause: LoadingShared.LoadingCauses) -> None:
    Reporting.RegisterReportFileCollector(_PersistentCollector)
Пример #7
0
def _OnStop(cause: LoadingShared.UnloadingCauses) -> None:
    Reporting.UnregisterReportFileCollector(_PersistentCollector)
Пример #8
0
def _OnStart(cause: LoadingShared.LoadingCauses) -> None:
    Reporting.RegisterReportFileCollector(_DebugLogCollector)