if (useDeviceList_) {
auto pos = std::find(begin(deviceNames_), end(deviceNames_), deviceName);
if (pos == end(deviceNames_)) {
- log.LogInfo(L"Bluetooth device \"%s\" not in list.", deviceName.c_str());
+ log.LogInfo(L"Bluetooth device \"{}\" not in list.", deviceName);
return BluetoothStatus::Unknown;
}
}
if ((inRangeInfo->deviceInfo.flags & BDIF_CONNECTED) && !(inRangeInfo->previousDeviceFlags & BDIF_CONNECTED)) {
- log.LogInfo(L"Bluetooth Audio device \"%s\" connected.", deviceName.c_str());
+ log.LogInfo(L"Bluetooth Audio device \"{}\" connected.", deviceName);
return BluetoothStatus::Connected;
} else if (!(inRangeInfo->deviceInfo.flags & BDIF_CONNECTED) && (inRangeInfo->previousDeviceFlags & BDIF_CONNECTED)) {
- log.LogInfo(L"Bluetooth Audio device \"%s\" disconnected.", deviceName.c_str());
+ log.LogInfo(L"Bluetooth Audio device \"{}\" disconnected.", deviceName);
return BluetoothStatus::Disconnected;
}
return BluetoothStatus::Unknown;
{
if (notifyParent_ && pwstrDeviceId != nullptr) {
const auto deviceName = GetDeviceNameFromId(pwstrDeviceId);
- WMLog::GetInstance().LogInfo(L"Device \"%s\" added", deviceName.c_str());
+ WMLog::GetInstance().LogInfo(L"Device \"{}\" added", deviceName);
notifyParent_->ShouldReInit();
}
return S_OK;
{
if (notifyParent_ && pwstrDeviceId != nullptr) {
const auto deviceName = GetDeviceNameFromId(pwstrDeviceId);
- WMLog::GetInstance().LogInfo(L"Device \"%s\" removed", deviceName.c_str());
+ WMLog::GetInstance().LogInfo(L"Device \"{}\" removed", deviceName);
notifyParent_->ShouldReInit();
}
return S_OK;
// TODO: Check if output device
const auto deviceName = GetDeviceNameFromId(pwstrDeviceId);
WMLog::GetInstance().LogInfo(
- L"Device \"%s\" status changed to %s",
- deviceName.c_str(),
- what.c_str());
+ L"Device \"{}\" status changed to {}",
+ deviceName,
+ what);
notifyParent_->ShouldReInit();
}
return S_OK;
}
}
} catch (const hresult_error &e) {
- log.LogError(L"MediaPlaybackController: Failed to pause current media session. Error: %s",
- e.message().c_str());
+ log.LogError(L"MediaPlaybackController: Failed to pause current media session. Error: {}",
+ e.message());
return false;
}
return true;
}
}
} catch (const hresult_error &e) {
- log.LogError(L"MediaPlaybackController: Failed to resume current media session. Error: %s",
- e.message().c_str());
+ log.LogError(L"MediaPlaybackController: Failed to resume current media session. Error: {}",
+ e.message());
return false;
}
return true;
void MuteControl::SetMute(bool mute)
{
- WMLog::GetInstance().LogInfo(L"Manual muting: %s", mute ? L"on" : L"off");
+ WMLog::GetInstance().LogInfo(L"Manual muting: {}", mute ? L"on" : L"off");
winAudio_->SetMute(mute);
}
void MuteControl::NotifyWorkstationLock(bool active)
{
- WMLog::GetInstance().LogInfo(L"Mute Event: Workstation Lock %s",
+ WMLog::GetInstance().LogInfo(L"Mute Event: Workstation Lock {}",
active ? L"start" : L"stop");
NotifyRestoreCondition(MuteTypeWorkstationLock, active);
}
void MuteControl::NotifyRemoteSession(bool active)
{
- WMLog::GetInstance().LogInfo(L"Mute Event: Remote Session %s",
+ WMLog::GetInstance().LogInfo(L"Mute Event: Remote Session {}",
active ? L"start" : L"stop");
NotifyRestoreCondition(MuteTypeRemoteSession, active);
}
{
if (displayWasOffOnce_ || active)
{
- WMLog::GetInstance().LogInfo(L"Mute Event: Display Standby %s",
+ WMLog::GetInstance().LogInfo(L"Mute Event: Display Standby {}",
active ? L"start" : L"stop");
NotifyRestoreCondition(MuteTypeDisplayStandby, active);
displayWasOffOnce_ = true;
void MuteControl::NotifyBluetoothConnected(bool connected)
{
WMLog::GetInstance().LogInfo(
- L"Mute Event: Bluetooth audio device %s",
+ L"Mute Event: Bluetooth audio device {}",
connected ? L"connected" : L"disconnected");
NotifyRestoreCondition(MuteTypeBluetoothDisconnect, !connected, true);
}
}
WMLog::GetInstance().LogInfo(
- L"QuietHours: Next start scheduled in %u s (window %d, %02u:%02u-%02u:%02u)",
+ L"QuietHours: Next start scheduled in {} s (window {}, {:02}:{:02}-{:02}:{:02})",
diffSec, idx,
windows_[idx].first / 3600, (windows_[idx].first % 3600) / 60,
windows_[idx].second / 3600, (windows_[idx].second % 3600) / 60);
}
WMLog::GetInstance().LogInfo(
- L"QuietHours: End scheduled in %u s (window %d)", diffSec, activeWindowIdx_);
+ L"QuietHours: End scheduled in {} s (window {})", diffSec, activeWindowIdx_);
return true;
}
const int activeIdx = FindActiveWindowIdx();
if (activeIdx != -1) {
activeWindowIdx_ = activeIdx;
- WMLog::GetInstance().LogInfo(L"QuietHours: Currently inside window %d — muting now", activeIdx);
+ WMLog::GetInstance().LogInfo(L"QuietHours: Currently inside window {} — muting now", activeIdx);
// Sending START will cause WinMute to mute and call SetEnd()
SendMessageW(hParent_, WM_WINMUTE_QUIETHOURS_START, 0, 0);
} else {
for (const auto &lang : dlgData.langModules) {
const auto itemId = SendMessage(hLanguageList, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(lang.langName.c_str()));
if (itemId == CB_ERR || itemId == CB_ERRSPACE) {
- WMLog::GetInstance().LogError(L"Failed to add language %ls to language selector", lang.langName.c_str());
+ WMLog::GetInstance().LogError(L"Failed to add language {} to language selector", lang.langName);
} else {
ComboBox_SetItemData(hLanguageList, itemId, lang.fileName.c_str());
}
for (UINT i = 0; i < epCount; ++i) {
CComPtr<IMMDevice> device = nullptr;
if (FAILED(audioEndpoints->Item(i, &device))) {
- log.LogError(L"Failed to get audio endpoint #%d", i);
+ log.LogError(L"Failed to get audio endpoint #{}", i);
continue;
}
}
} catch (const nlohmann::json::parse_error& pe) {
- log.LogError(L"Failed to parse update: %S", pe.what());
+ log.LogError(L"Failed to parse update: {}", ConvertStringToWideString(pe.what()));
return false;
} catch (const nlohmann::json::type_error& te) {
- log.LogError(L"Failed to parse update: %S", te.what());
+ log.LogError(L"Failed to parse update: {}", ConvertStringToWideString(te.what()));
return false;
} catch (const std::exception& e) {
- log.LogError(L"Failed to parse update: %S", e.what());
+ log.LogError(L"Failed to parse update: {}", ConvertStringToWideString(e.what()));
return false;
}
return true;
std::vector<int> curVersParsed;
WMLog& log = WMLog::GetInstance();
if (!ParseVersion(newVers, newVersParsed)) {
- log.LogError(L"Failed to parse new version string \"%s\"",
- newVers.c_str());
+ log.LogError(L"Failed to parse new version string \"{}\"",
+ newVers);
return std::nullopt;
} else if (!ParseVersion(curVers, curVersParsed)) {
- log.LogError(L"Failed to parse current version string \"%s\"",
- curVers.c_str());
+ log.LogError(L"Failed to parse current version string \"{}\"",
+ curVers);
return std::nullopt;
} else if (newVersParsed.size() != curVersParsed.size()) {
- log.LogError(L"Version format mismatch \"%s\" / \"%s\"",
- curVers.c_str(), newVers.c_str());
+ log.LogError(L"Version format mismatch \"{}\" / \"{}\"",
+ curVers, newVers);
return std::nullopt;
}
for (size_t i = 0; i < newVersParsed.size(); ++i) {
GetLastError());
return false;
} else if (statusCode != HTTP_STATUS_OK) {
- log.LogError(L"Update-Server returned HTTP %d", statusCode);
+ log.LogError(L"Update-Server returned HTTP {}", statusCode);
return false;
}
};
if (!hasPrefix(L"https://") && !hasPrefix(L"http://")) {
WMLog::GetInstance().LogError(
- L"Refused to open \"%s\": not a http(s) URL", url.c_str());
+ L"Refused to open \"{}\": not a http(s) URL", url);
return false;
}
hr = audioEndpoints->Item(i, &device);
if (FAILED(hr)) {
- log.LogError(L"Failed to get audio endpoint #%d", i);
+ log.LogError(L"Failed to get audio endpoint #{}", i);
continue;
}
const auto deviceName = GetAudioDeviceName(device);
if (!deviceName) {
- log.LogError(L"Failed to get device name for audio endpoint #%d", i);
+ log.LogError(L"Failed to get device name for audio endpoint #{}", i);
continue;
} else {
- log.LogInfo(L"Found audio endpoint \"%s\"", deviceName->c_str());
+ log.LogInfo(L"Found audio endpoint \"{}\"", *deviceName);
ep->deviceName = *deviceName;
}
if (FAILED(device->Activate(
__uuidof(IAudioSessionManager2), CLSCTX_INPROC_SERVER, nullptr,
reinterpret_cast<LPVOID*>(&sessionManager2)))) {
- log.LogError(L"Failed to retrieve audio session manager for \"%s\"",
- ep->deviceName.c_str());
+ log.LogError(L"Failed to retrieve audio session manager for \"{}\"",
+ ep->deviceName);
continue;
}
hr = sessionManager2->GetAudioSessionControl(nullptr, 0, &ep->sessionCtrl);
if (FAILED(hr)) {
- log.LogError(L"Failed to retrieve audio session manager for \"%s\"",
- ep->deviceName.c_str());
+ log.LogError(L"Failed to retrieve audio session manager for \"{}\"",
+ ep->deviceName);
continue;
}
__uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER,
nullptr, reinterpret_cast<LPVOID*>(&ep->endpointVolume));
if (FAILED(hr)) {
- log.LogError(L"Failed to active endpoint volume for device \"%s\"",
- ep->deviceName.c_str());
+ log.LogError(L"Failed to active endpoint volume for device \"{}\"",
+ ep->deviceName);
continue;
}
endpoints_.push_back(std::move(ep));
BOOL isMuted = FALSE;
if (FAILED(e->endpointVolume->GetMute(&isMuted))) {
log.LogError(
- L"Failed to get mute status for \"%s\"",
- e->deviceName.c_str());
+ L"Failed to get mute status for \"{}\"",
+ e->deviceName);
return false;
} else if (isMuted == FALSE) {
return false;
BOOL isMuted = FALSE;
if (FAILED(e->endpointVolume->GetMute(&isMuted))) {
log.LogError(
- L"Failed to get mute status for \"%s\"",
- e->deviceName.c_str());
+ L"Failed to get mute status for \"{}\"",
+ e->deviceName);
success = false;
} else {
e->wasMuted = isMuted;
}
for (auto& e : endpoints_) {
if (!IsEndpointManaged(e->deviceName)) {
- log.LogInfo(L"Skipping Endpoint %s", e->deviceName.c_str());
+ log.LogInfo(L"Skipping Endpoint {}", e->deviceName);
continue;
}
- log.LogInfo(L"Restoring: Mute %s for \"%s\"",
+ log.LogInfo(L"Restoring: Mute {} for \"{}\"",
(e->wasMuted) ? L"true" : L"false",
- e->deviceName.c_str());
+ e->deviceName);
if (e->wasMuted != true) {
if (FAILED(e->endpointVolume->SetMute(false, nullptr))) {
- log.LogError(L"Failed to restore mute status to %s for \"%s\"",
+ log.LogError(L"Failed to restore mute status to {} for \"{}\"",
(e->wasMuted) ? L"true" : L"false",
- e->deviceName.c_str());
+ e->deviceName);
success = false;
}
}
for (auto& e : endpoints_) {
BOOL isMuted = !mute;
if (!IsEndpointManaged(e->deviceName)) {
- log.LogInfo(L"Skipping Endpoint %s", e->deviceName.c_str());
+ log.LogInfo(L"Skipping Endpoint {}", e->deviceName);
continue;
}
if (FAILED(e->endpointVolume->GetMute(&isMuted))) {
log.LogError(
- L"Failed to get mute status for \"%s\"",
- e->deviceName.c_str());
+ L"Failed to get mute status for \"{}\"",
+ e->deviceName);
}
if (!!isMuted != mute) {
if (FAILED(e->endpointVolume->SetMute(mute, nullptr))) {
log.LogError(
- L"Failed to set mute status to %s for \"%s\"",
+ L"Failed to set mute status to {} for \"{}\"",
(e->wasMuted) ? L"true" : L"false",
- e->deviceName.c_str());
+ e->deviceName);
}
}
}
}
}
-void WMLog::LogDebug(_In_z_ _Printf_format_string_ const wchar_t *fmt, ...)
-{
- wchar_t buf[1024];
- va_list ap;
- va_start(ap, fmt);
-
- // _TRUNCATE: oversized messages (e.g. containing long external strings)
- // must be cut short, not trip the invalid-parameter handler.
- _vsnwprintf_s(buf, ARRAY_SIZE(buf), _TRUNCATE, fmt, ap);
- StoreMessage(LogLevel::Debug, buf);
-
- va_end(ap);
-}
-
-void WMLog::LogInfo(_In_z_ _Printf_format_string_ const wchar_t *fmt, ...)
-{
- wchar_t buf[1024];
- va_list ap;
- va_start(ap, fmt);
-
- _vsnwprintf_s(buf, ARRAY_SIZE(buf), _TRUNCATE, fmt, ap);
- StoreMessage(LogLevel::Info, buf);
-
- va_end(ap);
-}
-
-void WMLog::LogWarning(_In_z_ _Printf_format_string_ const wchar_t *fmt, ...)
-{
- wchar_t buf[1024];
- va_list ap;
- va_start(ap, fmt);
-
- _vsnwprintf_s(buf, ARRAY_SIZE(buf), _TRUNCATE, fmt, ap);
- StoreMessage(LogLevel::Warning, buf);
-
- va_end(ap);
-}
-
-void WMLog::LogError(_In_z_ _Printf_format_string_ const wchar_t *fmt, ...)
-{
- wchar_t buf[1024];
- va_list ap;
- va_start(ap, fmt);
-
- _vsnwprintf_s(buf, ARRAY_SIZE(buf), _TRUNCATE, fmt, ap);
- StoreMessage(LogLevel::Error, buf);
-
- va_end(ap);
-}
-
void WMLog::LogWinError(const wchar_t *functionName, DWORD lastError)
{
// Retrieve the system error message for the last-error code
#include "common.h"
+#include <format>
+
enum class LogLevel {
Debug,
Info,
public:
static WMLog& GetInstance();
- void LogDebug(_In_z_ _Printf_format_string_ const wchar_t *fmt, ...);
- void LogInfo(_In_z_ _Printf_format_string_ const wchar_t* fmt, ...);
- void LogWarning(_In_z_ _Printf_format_string_ const wchar_t *fmt, ...);
- void LogError(_In_z_ _Printf_format_string_ const wchar_t *fmt, ...);
+ // The format string is validated against the arguments at compile time.
+ template<typename... Args>
+ void LogDebug(std::wformat_string<Args...> fmt, Args&&... args)
+ {
+ StoreMessage(LogLevel::Debug,
+ std::format(fmt, std::forward<Args>(args)...).c_str());
+ }
+ template<typename... Args>
+ void LogInfo(std::wformat_string<Args...> fmt, Args&&... args)
+ {
+ StoreMessage(LogLevel::Info,
+ std::format(fmt, std::forward<Args>(args)...).c_str());
+ }
+ template<typename... Args>
+ void LogWarning(std::wformat_string<Args...> fmt, Args&&... args)
+ {
+ StoreMessage(LogLevel::Warning,
+ std::format(fmt, std::forward<Args>(args)...).c_str());
+ }
+ template<typename... Args>
+ void LogError(std::wformat_string<Args...> fmt, Args&&... args)
+ {
+ StoreMessage(LogLevel::Error,
+ std::format(fmt, std::forward<Args>(args)...).c_str());
+ }
void LogWinError(const wchar_t *functionName, DWORD errorCode = -1);
void EnableLogFile(bool enable);
if (regError != ERROR_SUCCESS) {
if (regError != ERROR_FILE_NOT_FOUND) {
ShowWindowsError(L"RegGetValueW", regError);
- log.LogError(L"[Registry] Failed to read key \"%s\".", valueName);
+ log.LogError(L"[Registry] Failed to read key \"{}\".", valueName);
}
} else {
std::wstring buf(bufSize / sizeof(wchar_t), L'\0');
nullptr, buf.data(), &bufSize);
if (regError != ERROR_SUCCESS) {
ShowWindowsError(L"RegGetValueW", regError);
- log.LogError(L"[Registry] Failed to query value for key \"%s\".",
+ log.LogError(L"[Registry] Failed to query value for key \"{}\".",
valueName);
} else {
buf.resize(wcslen(buf.c_str())); // Drop trailing '\0's
DWORD version = QueryValue(SettingsKey::SETTINGS_VERSION);
if (version > CURRENT_SETTINGS_VERSION) {
WMLog::GetInstance().LogError(
- L"Settings version %d is newer than application supports (%d). "
+ L"Settings version {} is newer than application supports ({}). "
L"Some settings may not work correctly.",
version, CURRENT_SETTINGS_VERSION);
} else if (version == 0) {
log.LogWarning(
L"Registry entry for auto start has wrong executable "
L"path."
- L"Current path \"%s\". Path in registry \"%s\"",
- wmPath, autostartPathFromReg.c_str());
+ L"Current path \"{}\". Path in registry \"{}\"",
+ wmPath, autostartPathFromReg);
} else {
isEnabled = true;
}
if (regError != ERROR_FILE_NOT_FOUND) {
ShowWindowsError(L"RegQueryValueExW", regError);
WMLog& log = WMLog::GetInstance();
- log.LogError(L"[Registry] Failed to query value for key \"%s\"",
+ log.LogError(L"[Registry] Failed to query value for key \"{}\"",
keyStr);
}
return GetDefaultSetting(key);
if (numEntries % 2 != 0) {
WMLog::GetInstance().LogError(
L"Corrupted Quiet Hours times in registry: odd number of entries "
- L"(%d). Resetting QuietHours",
+ L"({}). Resetting QuietHours",
numEntries);
TaskDialog(
nullptr, nullptr, PROGRAM_NAME,
reinterpret_cast<LPBYTE>(&timeEntry.first), &size);
if (regError != ERROR_SUCCESS) {
WMLog::GetInstance().LogError(
- L"Failed to read entry \"%s\" while initializing quiet hours "
- L"(%d)",
- keyStart.c_str(), regError);
+ L"Failed to read entry \"{}\" while initializing quiet hours "
+ L"({})",
+ keyStart, regError);
continue;
}
reinterpret_cast<LPBYTE>(&timeEntry.second), &size);
if (regError != ERROR_SUCCESS) {
WMLog::GetInstance().LogError(
- L"Failed to read entry \"%s\" while initializing quiet hours "
- L"(%d)",
- keyStart.c_str(), regError);
+ L"Failed to read entry \"{}\" while initializing quiet hours "
+ L"({})",
+ keyEnd, regError);
continue;
}
times.push_back(std::move(timeEntry));
langDlls.push_back(langMod);
}
} catch (const nlohmann::json::parse_error &pe) {
- WMLog::GetInstance().LogError(L"Failed to parse language file \"%ls\": %S", wfd.cFileName, pe.what());
+ WMLog::GetInstance().LogError(L"Failed to parse language file \"{}\": {}",
+ wfd.cFileName, ConvertStringToWideString(pe.what()));
}
} while (FindNextFileW(hFindFile, &wfd));
}
const fs::path loadFilePath{ fileName};
*langFilePath /= loadFilePath.filename(); // Sanitize
if (!fs::exists(*langFilePath)) {
- log.LogError(L"Language module \"%ls\" does not exist", langFilePath->c_str());
+ log.LogError(L"Language module \"{}\" does not exist", langFilePath->wstring());
return false;
}
try {
TranslationMap translations_temp;
for (auto it = json_data.begin(); it != json_data.end(); ++it) {
if (it->is_structured()) {
- log.LogError(L"Language module \"%ls\" has nested elements", langFilePath->c_str());
+ log.LogError(L"Language module \"{}\" has nested elements", langFilePath->wstring());
return false;
}
if (it.value() == L"") {
- log.LogInfo(L"No translation for \"%S\" found in language file", it.key().c_str());
+ log.LogInfo(L"No translation for \"{}\" found in language file",
+ ConvertStringToWideString(it.key()));
} else {
const auto value = ConvertStringToWideString(it.value());
if (value == L"") {
- log.LogError(L"Unable to convert language element \"%S\"", it.key().c_str());
+ log.LogError(L"Unable to convert language element \"{}\"",
+ ConvertStringToWideString(it.key()));
return false;
}
if (translations_temp.contains(it.key())) {
- log.LogError(L"Double entry for language key \"%S\" found.", it.key().c_str());
+ log.LogError(L"Double entry for language key \"{}\" found.",
+ ConvertStringToWideString(it.key()));
return false;
}
translations_temp[it.key()] = value;
strings = std::move(translations_temp);
} catch (const nlohmann::json::parse_error &pe) {
log.LogError(
- L"Failed to parse language file \"%ls\": %S",
- langFilePath->filename().c_str(),
- pe.what());
+ L"Failed to parse language file \"{}\": {}",
+ langFilePath->filename().wstring(),
+ ConvertStringToWideString(pe.what()));
return false;
}
return true;
TranslationMap new_lang;
if (!LoadLanguage(fileName, new_lang)) {
WMLog::GetInstance().LogError(
- L"Failed to load language \"%ls\"",
- fileName.c_str());
+ L"Failed to load language \"{}\"",
+ fileName);
return false;
} else {
UnloadLanguage();
if (log.IsLogFileEnabled()) {
std::wstring versionNumber;
GetWinMuteVersion(versionNumber);
- log.LogInfo(L"Starting WinMute %s", versionNumber.c_str());
+ log.LogInfo(L"Starting WinMute {}", versionNumber);
log.LogInfo(L"Loading settings:");
- log.LogInfo(L"Check for updates: %s", settings_.QueryValue(SettingsKey::CHECK_FOR_UPDATE) ? L"Yes" : L"No");
- log.LogInfo(L"\tCheck for beta updates: %s", settings_.QueryValue(SettingsKey::CHECK_FOR_BETA_UPDATE) ? L"Yes" : L"No");
- log.LogInfo(L"\tRestore volume: %s", settings_.QueryValue(SettingsKey::RESTORE_AUDIO) ? L"Yes" : L"No");
- log.LogInfo(L"\tMute delay: %d", settings_.QueryValue(SettingsKey::MUTE_DELAY));
- log.LogInfo(L"\tMute on lock: %s", settings_.QueryValue(SettingsKey::MUTE_ON_LOCK) ? L"Yes" : L"No");
- log.LogInfo(L"\tMute on display standby: %s", settings_.QueryValue(SettingsKey::MUTE_ON_DISPLAYSTANDBY) ? L"Yes" : L"No");
- log.LogInfo(L"\tMute on logout: %s", settings_.QueryValue(SettingsKey::MUTE_ON_LOGOUT) ? L"Yes" : L"No");
- log.LogInfo(L"\tMute on suspend: %s", settings_.QueryValue(SettingsKey::MUTE_ON_SUSPEND) ? L"Yes" : L"No");
- log.LogInfo(L"\tMute on shutdown: %s", settings_.QueryValue(SettingsKey::MUTE_ON_SHUTDOWN) ? L"Yes" : L"No");
- log.LogInfo(L"\tShow notifications: %s", settings_.QueryValue(SettingsKey::NOTIFICATIONS_ENABLED) ? L"Yes" : L"No");
- log.LogInfo(L"\tMute on bluetooth: %s", settings_.QueryValue(SettingsKey::MUTE_ON_BLUETOOTH) ? L"Yes" : L"No");
- log.LogInfo(L"\tTry pausing media when muting: %s", settings_.QueryValue(SettingsKey::MUTE_TRY_PAUSE_MEDIA) ? L"Yes" : L"No");
- log.LogInfo(L"\tTry resuming media when unmuting: %s", settings_.QueryValue(SettingsKey::MUTE_TRY_RESUME_MEDIA) ? L"Yes" : L"No");
- log.LogInfo(L"\t\tUse devicelist: %s", settings_.QueryValue(SettingsKey::MUTE_ON_BLUETOOTH_DEVICELIST) ? L"Yes" : L"No");
- log.LogInfo(L"\tMute on WLAN: %s", settings_.QueryValue(SettingsKey::MUTE_ON_WLAN) ? L"Yes" : L"No");
- log.LogInfo(L"\t\tUse allowlist: %s", settings_.QueryValue(SettingsKey::MUTE_ON_WLAN_ALLOWLIST) ? L"Yes" : L"No");
- log.LogInfo(L"\tMute specific endpoints only: %s", settings_.QueryValue(SettingsKey::MUTE_INDIVIDUAL_ENDPOINTS) ? L"Yes" : L"No");
+ log.LogInfo(L"Check for updates: {}", settings_.QueryValue(SettingsKey::CHECK_FOR_UPDATE) ? L"Yes" : L"No");
+ log.LogInfo(L"\tCheck for beta updates: {}", settings_.QueryValue(SettingsKey::CHECK_FOR_BETA_UPDATE) ? L"Yes" : L"No");
+ log.LogInfo(L"\tRestore volume: {}", settings_.QueryValue(SettingsKey::RESTORE_AUDIO) ? L"Yes" : L"No");
+ log.LogInfo(L"\tMute delay: {}", settings_.QueryValue(SettingsKey::MUTE_DELAY));
+ log.LogInfo(L"\tMute on lock: {}", settings_.QueryValue(SettingsKey::MUTE_ON_LOCK) ? L"Yes" : L"No");
+ log.LogInfo(L"\tMute on display standby: {}", settings_.QueryValue(SettingsKey::MUTE_ON_DISPLAYSTANDBY) ? L"Yes" : L"No");
+ log.LogInfo(L"\tMute on logout: {}", settings_.QueryValue(SettingsKey::MUTE_ON_LOGOUT) ? L"Yes" : L"No");
+ log.LogInfo(L"\tMute on suspend: {}", settings_.QueryValue(SettingsKey::MUTE_ON_SUSPEND) ? L"Yes" : L"No");
+ log.LogInfo(L"\tMute on shutdown: {}", settings_.QueryValue(SettingsKey::MUTE_ON_SHUTDOWN) ? L"Yes" : L"No");
+ log.LogInfo(L"\tShow notifications: {}", settings_.QueryValue(SettingsKey::NOTIFICATIONS_ENABLED) ? L"Yes" : L"No");
+ log.LogInfo(L"\tMute on bluetooth: {}", settings_.QueryValue(SettingsKey::MUTE_ON_BLUETOOTH) ? L"Yes" : L"No");
+ log.LogInfo(L"\tTry pausing media when muting: {}", settings_.QueryValue(SettingsKey::MUTE_TRY_PAUSE_MEDIA) ? L"Yes" : L"No");
+ log.LogInfo(L"\tTry resuming media when unmuting: {}", settings_.QueryValue(SettingsKey::MUTE_TRY_RESUME_MEDIA) ? L"Yes" : L"No");
+ log.LogInfo(L"\t\tUse devicelist: {}", settings_.QueryValue(SettingsKey::MUTE_ON_BLUETOOTH_DEVICELIST) ? L"Yes" : L"No");
+ log.LogInfo(L"\tMute on WLAN: {}", settings_.QueryValue(SettingsKey::MUTE_ON_WLAN) ? L"Yes" : L"No");
+ log.LogInfo(L"\t\tUse allowlist: {}", settings_.QueryValue(SettingsKey::MUTE_ON_WLAN_ALLOWLIST) ? L"Yes" : L"No");
+ log.LogInfo(L"\tMute specific endpoints only: {}", settings_.QueryValue(SettingsKey::MUTE_INDIVIDUAL_ENDPOINTS) ? L"Yes" : L"No");
}
if (!settings_.QueryValue(SettingsKey::MUTE_INDIVIDUAL_ENDPOINTS)) {