diff options
Diffstat (limited to 'windows/nsis-plugins/src/log/log.cpp')
| -rw-r--r-- | windows/nsis-plugins/src/log/log.cpp | 15 |
1 files changed, 11 insertions, 4 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(); |
