diff options
Diffstat (limited to 'windows/nsis-plugins/src')
| -rw-r--r-- | windows/nsis-plugins/src/log/log.cpp | 15 | ||||
| -rw-r--r-- | windows/nsis-plugins/src/log/log.def | 2 |
2 files changed, 12 insertions, 5 deletions
diff --git a/windows/nsis-plugins/src/log/log.cpp b/windows/nsis-plugins/src/log/log.cpp index 70cd185206..4a7bf1bf49 100644 --- a/windows/nsis-plugins/src/log/log.cpp +++ b/windows/nsis-plugins/src/log/log.cpp @@ -184,17 +184,18 @@ std::wstring GetWindowsVersion() } // anonymous namespace // -// Initialize +// SetLogTarget // // Opens and maintains an open handle to the log file. // enum class LogTarget { LOG_INSTALL = 0, - LOG_UNINSTALL = 1 + LOG_UNINSTALL = 1, + LOG_VOID = 2 }; -void __declspec(dllexport) NSISCALL Initialize +void __declspec(dllexport) NSISCALL SetLogTarget ( HWND hwndParent, int string_size, @@ -225,6 +226,12 @@ void __declspec(dllexport) NSISCALL Initialize logfile = L"uninstall.log"; break; } + case static_cast<int>(LogTarget::LOG_VOID): + { + delete g_logger; + g_logger = nullptr; + return; + } default: { THROW_ERROR("Invalid log target"); @@ -263,7 +270,7 @@ void __declspec(dllexport) NSISCALL Initialize { std::stringstream ss; - ss << "Failed to initialize logging plugin." + ss << "Failed to set logging plugin target." << std::endl << err.what(); diff --git a/windows/nsis-plugins/src/log/log.def b/windows/nsis-plugins/src/log/log.def index 11cffd21e3..d51b04ab7b 100644 --- a/windows/nsis-plugins/src/log/log.def +++ b/windows/nsis-plugins/src/log/log.def @@ -2,7 +2,7 @@ LIBRARY log EXPORTS -Initialize +SetLogTarget Log LogWithDetails LogWindowsVersion |
