game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
Logger Class Reference

Thread-safe logging system with levels and optional file output. More...

#include <logger.h>

Static Public Member Functions

template<typename... Args>
static void debug (const std::string &message, Args &&... args)
 Log debug message (verbose development info).
template<typename... Args>
static void error (const std::string &message, Args &&... args)
 Log error message (recoverable failure).
template<typename... Args>
static void fatal (const std::string &message, Args &&... args)
 Log fatal error message (application will terminate).
template<typename... Args>
static void info (const std::string &message, Args &&... args)
 Log info message (general information).
static void init (const std::string &logFilePath="", LogLevel minLevel=LogLevel::INFO)
 Initialize logger with optional file output.
static void setConsoleOutput (bool enabled)
 Enable or disable console output.
static void setLogLevel (LogLevel level)
 Set minimum log level.
static void setTimestamps (bool enabled)
 Enable or disable timestamps in log messages.
static void shutdown ()
 Shutdown logger and close log file.
template<typename... Args>
static void warn (const std::string &message, Args &&... args)
 Log warning message (non-critical issue).

Detailed Description

Thread-safe logging system with levels and optional file output.

Singleton pattern ensures consistent logging across entire application. All methods are static for convenient usage without getInstance() calls.

Definition at line 56 of file logger.h.

Member Function Documentation

◆ debug()

template<typename... Args>
void Logger::debug ( const std::string & message,
Args &&... args )
inlinestatic

◆ error()

template<typename... Args>
void Logger::error ( const std::string & message,
Args &&... args )
inlinestatic

Log error message (recoverable failure).

Definition at line 124 of file logger.h.

References ERROR.

Referenced by GameLibrary::GameLibrary(), GameLibrary::addGame(), GameLibrary::addGameToCollection(), GameProcess::attachToRunningProcess(), UMULauncher::buildLaunchCommand(), FileDownloadService::calculateChecksum(), FileVerificationService::calculateChecksum(), core::SettingsController::Impl::checkSchemaVersionSafe(), PrefixSnapshotService::compareSnapshots(), PrefixSnapshotService::compareWithCurrent(), PrefixSnapshotService::createIncrementalSnapshot(), UMULauncher::createPrefix(), PrefixSnapshotService::createSnapshot(), GameLibrary::discoverImagesForGame(), FileDownloadService::download(), UMULauncher::downloadGEProton(), RunnerDownloadService::downloadRunner(), UMULauncher::downloadUMUProton(), ProcessExecutor::execute(), ProcessExecutor::executeBackground(), ProcessExecutor::executeWithLines(), ProcessExecutor::executeWithOutput(), PrefixSnapshotService::exportSnapshot(), ArchiveExtractService::extract(), SteamLibraryScanner::fetchGameNameFromSteamAPI(), SteamLibraryScanner::forceUninstallGame(), FileVerificationService::generateManifest(), GOGIntegration::getAuthStatus(), RunnerDownloadService::getAvailableReleases(), RunnerDownloadService::getDefaultInstallPath(), LegendaryIntegration::getGameInfo(), LegendaryIntegration::getInstalledGames(), RunnerDownloadService::getInstalledRunners(), LutrisAPIService::getInstallers(), LutrisAPIService::getInstallerScript(), PrefixSnapshotService::importSnapshot(), PerformanceProfileService::Impl::initialize(), GameProcess::launch(), core::LaunchController::launchGame(), GameProcessManager::launchGame(), GOGIntegration::launchGame(), LegendaryIntegration::launchGame(), PrefixSnapshotService::listSnapshotFiles(), SteamAppInfoParser::load(), SteamLibraryScanner::loadAppNameCache(), PerformanceProfileService::Impl::loadGameProfiles(), FileVerificationService::loadManifest(), ACFParser::parseManifest(), SteamLibraryScanner::readDLCFromACF(), core::SettingsController::Impl::readJsonFile(), SteamLibraryScanner::readSteamCloudSaveInfo(), SteamLibraryScanner::readSteamLaunchOptions(), SteamLibraryScanner::readSteamPlaytimeData(), SteamLibraryScanner::readSteamProtonVersion(), GameLibrary::removeGame(), GameLibrary::removeGameFromCollection(), SteamLibraryScanner::requestUninstallGame(), SteamLibraryScanner::restartSteam(), PrefixSnapshotService::restoreFiles(), CloudSaveService::restoreSnapshot(), PrefixSnapshotService::restoreSnapshot(), PerformanceProfileService::Impl::saveGameProfiles(), FileVerificationService::saveManifest(), core::SettingsController::saveSettings(), GameLibrary::saveToDisk(), LutrisAPIService::searchGames(), GOGIntegration::uninstallGame(), RunnerDownloadService::uninstallRunner(), GameLibrary::updateGame(), FileVerificationService::verifyFile(), SteamLibraryScanner::writeSteamLaunchOptions(), and SteamLibraryScanner::writeSteamProtonVersion().

◆ fatal()

template<typename... Args>
void Logger::fatal ( const std::string & message,
Args &&... args )
inlinestatic

Log fatal error message (application will terminate).

Definition at line 132 of file logger.h.

References FATAL.

◆ info()

template<typename... Args>
void Logger::info ( const std::string & message,
Args &&... args )
inlinestatic

Log info message (general information).

Definition at line 108 of file logger.h.

References INFO.

Referenced by MainWindow::MainWindow(), anonymous_namespace{game_process.cpp}::addApplicationSpecificFixes(), GameLibrary::addGame(), GameLibrary::addGameToCollection(), anonymous_namespace{game_process.cpp}::addGPUOptimizations(), anonymous_namespace{game_process.cpp}::addSyncEnvironment(), GameSuggestionService::applySuggestions(), GameProcess::attachToRunningProcess(), GOGIntegration::authenticate(), anonymous_namespace{game_process.cpp}::buildGamescopeWrapper(), anonymous_namespace{game_process.cpp}::buildWrapperChain(), FileDownloadService::cancel(), InstallationExecutor::cancel(), RunnerDownloadService::cancelDownload(), GameLaunchManager::cancelLaunch(), FileVerificationService::cancelVerification(), PrefixSnapshotService::cleanupOldAutoSnapshots(), FrameMetricsService::cleanupOldLogs(), PrefixSnapshotService::cleanupOldSnapshots(), FileVerificationService::clearCache(), HLTBService::clearCache(), LutrisAPIService::clearCache(), ProtonDBService::clearCache(), SteamGridDBService::clearCache(), SteamUpdateMonitor::clearCache(), GameDatabase::close(), GameLibrary::createCollection(), UMULauncher::createPrefix(), PrefixSnapshotService::createSnapshot(), GameLibrary::deleteCollection(), SteamCDN::discoverImages(), GameLibrary::discoverMissingImages(), FileDownloadService::download(), SteamGridDBService::downloadBestCover(), GOGIntegration::downloadCloudSaves(), LegendaryIntegration::downloadCloudSaves(), SteamGame::downloadCoverArt(), SteamGridDBService::downloadImage(), RunnerDownloadService::downloadRunner(), PrefixSnapshotService::exportSnapshot(), ArchiveExtractService::extract(), SteamLibraryScanner::fetchGameNameFromSteamAPI(), LutrisAPIService::findByGogId(), LutrisAPIService::findBySteamId(), LutrisConfigParser::findConfigForExecutable(), ProtonDBService::findGameByName(), SteamLibraryScanner::forceUninstallGame(), FileVerificationService::generateManifest(), SteamGridDBService::getAllImages(), RunnerDownloadService::getAvailableReleases(), SteamGridDBService::getGameBySteamAppId(), LutrisAPIService::getGameDetails(), HLTBService::getGameInfo(), ProtonDBService::getGameInfo(), LutrisAPIService::getInstallers(), LutrisAPIService::getInstallerScript(), LegendaryIntegration::getLibrary(), ProtonDBService::getLutrisInfo(), ProtonDBService::getSteamAppInfo(), ProtonDBService::getSteamDeckInfo(), GameSuggestionService::getSuggestions(), GOGIntegration::importGame(), LegendaryIntegration::importGame(), PrefixSnapshotService::importSnapshot(), InstallationExecutor::install(), LegendaryIntegration::installGame(), ProtonCache::invalidate(), GameProcess::kill(), GameProcess::launch(), GameProcessManager::launchGame(), GOGIntegration::launchGame(), LegendaryIntegration::launchGame(), SteamAppInfoParser::load(), SteamLibraryScanner::loadAppNameCache(), GameLibrary::loadFromDisk(), FileVerificationService::loadManifest(), core::SettingsController::loadSettings(), UMULauncher::Impl::loadUMUDatabase(), GOGIntegration::logout(), LegendaryIntegration::logout(), main(), SteamUpdateMonitor::Impl::monitorLoop(), LegendaryIntegration::moveGame(), GameSessionService::onGameStarted(), GameSessionService::onGameStopped(), GameDatabase::open(), LutrisConfigParser::parseConfigFile(), SystemInfoService::refresh(), GameLibrary::refreshStaleImages(), GameLibrary::removeGame(), GameLibrary::removeGameFromCollection(), LegendaryIntegration::repairGame(), anonymous_namespace{game_process.cpp}::GameModeAPI::requestEndFor(), GameLaunchManager::requestLaunch(), anonymous_namespace{game_process.cpp}::GameModeAPI::requestStartFor(), SteamProcessMonitor::requestSteamShutdown(), SteamProcessMonitor::requestSteamStart(), SteamLibraryScanner::requestUninstallGame(), SteamLibraryScanner::resolveProtonPath(), SteamLibraryScanner::restartSteam(), PrefixSnapshotService::restoreSnapshot(), UMULauncher::runWinetricks(), FileVerificationService::saveManifest(), core::SettingsController::saveSettings(), GameLibrary::saveToDisk(), GameScannerService::scanAll(), SteamLibraryScanner::scanAllOwnedGames(), GameScannerService::scanBottles(), GameProcessManager::scanForRunningGames(), SteamUpdateMonitor::Impl::scanForUpdates(), GameScannerService::scanHeroic(), GameScannerService::scanLegendary(), GameScannerService::scanLutris(), GameScannerService::scanNativeGames(), SteamLibraryScanner::scanProtonVersions(), GameScannerService::scanWinePrefixes(), HLTBService::search(), ProtonDBService::searchByName(), LutrisAPIService::searchGames(), SteamGridDBService::searchGames(), SteamGridDBService::setApiKey(), GameStateSync::start(), SteamUpdateMonitor::start(), FrameMetricsService::startCollection(), SteamProcessMonitor::startMonitoring(), GameProcess::stop(), GameStateSync::stop(), SteamUpdateMonitor::stop(), GameProcessManager::stopGame(), SteamProcessMonitor::stopMonitoring(), GOGIntegration::syncCloudSaves(), LegendaryIntegration::syncCloudSaves(), GOGIntegration::syncLibrary(), LegendaryIntegration::syncLibrary(), CloudSaveService::syncSaves(), GOGIntegration::uninstallGame(), LegendaryIntegration::uninstallGame(), RunnerDownloadService::uninstallRunner(), GameProcess::update(), GameProcessManager::update(), GameLibrary::updateGame(), GOGIntegration::updateGame(), LegendaryIntegration::updateGame(), GOGIntegration::uploadCloudSaves(), LegendaryIntegration::uploadCloudSaves(), FileVerificationService::verifyGame(), GOGIntegration::verifyGame(), LegendaryIntegration::verifyGame(), FileVerificationService::verifySteamGame(), SteamProcessMonitor::waitForSteamInitialized(), SteamDownloadMonitor::Impl::watchGame(), SteamLibraryScanner::writeSteamLaunchOptions(), and SteamLibraryScanner::writeSteamProtonVersion().

◆ init()

void Logger::init ( const std::string & logFilePath = "",
LogLevel minLevel = LogLevel::INFO )
static

Initialize logger with optional file output.

Parameters
logFilePathPath to log file (empty = console only)
minLevelMinimum log level to output (default: INFO)

Definition at line 17 of file logger.cpp.

◆ setConsoleOutput()

void Logger::setConsoleOutput ( bool enabled)
static

Enable or disable console output.

Parameters
enabledIf false, only logs to file (if configured)

Definition at line 48 of file logger.cpp.

◆ setLogLevel()

void Logger::setLogLevel ( LogLevel level)
static

Set minimum log level.

Parameters
levelMessages below this level will be ignored

Definition at line 41 of file logger.cpp.

Referenced by main().

◆ setTimestamps()

void Logger::setTimestamps ( bool enabled)
static

Enable or disable timestamps in log messages.

Parameters
enabledIf true, prepends timestamp to each message

Definition at line 55 of file logger.cpp.

◆ shutdown()

void Logger::shutdown ( )
static

Shutdown logger and close log file.

Definition at line 62 of file logger.cpp.

◆ warn()

template<typename... Args>
void Logger::warn ( const std::string & message,
Args &&... args )
inlinestatic

Log warning message (non-critical issue).

Definition at line 116 of file logger.h.

References WARN.

Referenced by anonymous_namespace{game_process.cpp}::addApplicationSpecificFixes(), GameLibrary::addGame(), GameSuggestionService::applySuggestions(), GameDatabase::beginTransaction(), UMULauncher::buildLaunchCommand(), UMULauncher::buildLaunchComponents(), MangoHudLogReader::buildLaunchConfigFile(), FrameMetricsService::cleanupOldLogs(), core::anonymous_namespace{atomic_write.cpp}::cleanupTempFile(), SteamGridDBService::clearCache(), PerformanceProfileService::createProfile(), CloudSaveService::createSnapshot(), PerformanceProfileService::deleteProfile(), Game::deserializeMetadata(), Game::deserializeRunnerConfig(), SteamGridDBService::downloadBestCover(), RunnerDownloadService::downloadRunner(), ProcessExecutor::execute(), SteamLibraryScanner::fetchGameNameFromSteamAPI(), SteamLibraryScanner::fetchSteamMetadata(), LutrisConfigParser::findConfigForExecutable(), ShaderCacheManager::findDXVKCache(), ProtonDBService::findGameByName(), SteamLibraryScanner::forceUninstallGame(), core::anonymous_namespace{atomic_write.cpp}::fsyncParentDir(), InstallationExecutor::getAvailableSpace(), ShaderCacheManager::getCacheBackups(), SteamGridDBService::getCacheDirectory(), HLTBService::getGameInfo(), ProtonDBService::getGameInfo(), HLTBService::getGameInfoById(), ProtonDBService::getLutrisInfo(), ProcessExecutor::getProcessPid(), ProtonDBService::getSteamAppInfo(), ProtonDBService::getSteamDeckInfo(), GameSuggestionService::getSuggestionsAsync(), UMULauncher::hasProtonUpdates(), PrefixSnapshotService::importSnapshot(), GameSuggestionService::isRunnerAvailable(), GameProcess::kill(), ProcessExecutor::killProcess(), GameProcessManager::launchGame(), SteamAppInfoParser::load(), PerformanceProfileService::Impl::loadAllProfiles(), SteamLibraryScanner::loadAppNameCache(), loadAppNamesFromLocalCache(), anonymous_namespace{runner_download_service.cpp}::loadGitHubCache(), PerformanceProfileService::Impl::loadGlobalProfiles(), core::SettingsController::loadSettings(), UMULauncher::Impl::loadUMUDatabase(), main(), anonymous_namespace{game.cpp}::mergeUnknownKeys(), GameSessionService::onGameStopped(), GameDatabase::open(), LutrisConfigParser::parseConfigFile(), SteamLibraryScanner::populateDirectLaunchInfo(), SteamDownloadMonitor::readGameState(), SteamLibraryScanner::readSteamCloudSaveInfo(), UMULauncher::Impl::refreshProtonVersions(), anonymous_namespace{game_process.cpp}::GameModeAPI::requestEndFor(), GameLaunchManager::requestLaunch(), anonymous_namespace{game_process.cpp}::GameModeAPI::requestStartFor(), SteamLibraryScanner::resolveProtonPath(), PrefixSnapshotService::restoreFiles(), PrefixSnapshotService::restoreSnapshot(), anonymous_namespace{runner_download_service.cpp}::saveGitHubCache(), core::SettingsController::saveSettings(), GameScannerService::scanAll(), GameScannerService::scanBottles(), GameScannerService::scanLutris(), HLTBService::search(), ProtonDBService::searchByName(), SteamGridDBService::searchGames(), SteamUpdateMonitor::start(), GameProcess::stop(), GameProcessManager::stopGame(), CloudSaveService::syncSaves(), GameProcess::update(), SteamProcessMonitor::waitForSteamInitialized(), SteamLibraryScanner::writeSteamLaunchOptions(), and SteamLibraryScanner::writeSteamProtonVersion().


The documentation for this class was generated from the following files: