-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50dcd97
commit 65f8966
Showing
5 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "pch.h" | ||
#include "ShortcutGuideLogger.h" | ||
#include <common\settings_helpers.h> | ||
#include <filesystem> | ||
|
||
std::shared_ptr<Logger> ShortcutGuideLogger::logger; | ||
|
||
void ShortcutGuideLogger::Init(std::wstring moduleSaveLocation) | ||
{ | ||
std::filesystem::path logFilePath(moduleSaveLocation); | ||
logFilePath.append(LogSettings::shortcutGuideLogPath); | ||
logger = std::make_shared<Logger>(LogSettings::shortcutGuideLoggerName, logFilePath.wstring(), PTSettingsHelper::get_log_settings_file_location()); | ||
logger->info("Shortcut Guide logger initialized"); | ||
} | ||
|
||
std::shared_ptr<Logger> ShortcutGuideLogger::GetLogger() | ||
{ | ||
if (!logger) | ||
{ | ||
throw "Shortcut Guide logger is not initialized"; | ||
} | ||
|
||
return logger; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#pragma once | ||
#include <common/logger/logger.h> | ||
|
||
class ShortcutGuideLogger | ||
{ | ||
static std::shared_ptr<Logger> logger; | ||
|
||
public: | ||
static void Init(std::wstring moduleSaveLocation); | ||
static std::shared_ptr<Logger> GetLogger(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters