Resolve variables in log messages

This commit is contained in:
WarmUpTill
2022-12-27 14:48:40 +01:00
committed by WarmUpTill
parent 7ae490ca25
commit d04884fe8b
7 changed files with 17 additions and 16 deletions

View File

@@ -102,8 +102,8 @@ void MacroActionSceneOrder::LogAction() const
if (it != actionTypes.end()) {
vblog(LOG_INFO,
"performed order action \"%s\" for source \"%s\" on scene \"%s\"",
it->second.c_str(), _source.ToString().c_str(),
_scene.ToString().c_str());
it->second.c_str(), _source.ToString(true).c_str(),
_scene.ToString(true).c_str());
} else {
blog(LOG_WARNING, "ignored unknown scene order action %d",
static_cast<int>(_action));

View File

@@ -125,11 +125,11 @@ void MacroActionSwitchScene::LogAction() const
switch (t) {
case SceneSelection::Type::SCENE:
vblog(LOG_INFO, "switch to scene '%s'",
_scene.ToString().c_str());
_scene.ToString(true).c_str());
break;
case SceneSelection::Type::GROUP:
vblog(LOG_INFO, "switch to scene '%s' (scene group '%s')",
sceneName.c_str(), _scene.ToString().c_str());
sceneName.c_str(), _scene.ToString(true).c_str());
break;
case SceneSelection::Type::PREVIOUS:
vblog(LOG_INFO, "switch to previous scene '%s'",

View File

@@ -30,7 +30,7 @@ void MacroActionSceneTransform::LogAction() const
{
vblog(LOG_INFO,
"performed transform action for source \"%s\" on scene \"%s\"",
_source.ToString().c_str(), _scene.ToString().c_str());
_source.ToString(true).c_str(), _scene.ToString(true).c_str());
}
bool MacroActionSceneTransform::Save(obs_data_t *obj) const

View File

@@ -99,13 +99,14 @@ void MacroActionSceneVisibility::LogAction() const
if (_sourceType == SceneItemSourceType::SOURCE) {
vblog(LOG_INFO,
"performed visibility action \"%s\" for source \"%s\" on scene \"%s\"",
it->second.c_str(), _source.ToString().c_str(),
_scene.ToString().c_str());
it->second.c_str(),
_source.ToString(true).c_str(),
_scene.ToString(true).c_str());
} else {
vblog(LOG_INFO,
"performed visibility action \"%s\" for any source type \"%s\" on scene \"%s\"",
it->second.c_str(), _sourceGroup.c_str(),
_scene.ToString().c_str());
_scene.ToString(true).c_str());
}
} else {
blog(LOG_WARNING, "ignored unknown SceneVisibility action %d",

View File

@@ -64,7 +64,7 @@ void MacroActionScreenshot::LogAction() const
vblog(LOG_INFO, "trigger screenshot for \"%s\"",
_targetType == TargetType::SOURCE
? GetWeakSourceName(_source).c_str()
: _scene.ToString().c_str());
: _scene.ToString(true).c_str());
}
bool MacroActionScreenshot::Save(obs_data_t *obj) const

View File

@@ -77,7 +77,7 @@ void MacroActionSudioMode::LogAction() const
auto it = actionTypes.find(_action);
if (it != actionTypes.end()) {
vblog(LOG_INFO, "performed action \"%s\" with scene \"%s\"",
it->second.c_str(), _scene.ToString().c_str());
it->second.c_str(), _scene.ToString(true).c_str());
} else {
blog(LOG_WARNING, "ignored unknown studio mode action %d",
static_cast<int>(_action));

View File

@@ -127,18 +127,18 @@ void MacroActionTransition::LogAction() const
msgBegin += "set scene transition";
break;
case Type::SCENE_OVERRIDE:
msgBegin +=
"set scene override transition of " + _scene.ToString();
msgBegin += "set scene override transition of " +
_scene.ToString(true);
break;
case Type::SOURCE_SHOW:
msgBegin += "set source show transition of " +
_source.ToString() + " on scene " +
_scene.ToString();
_source.ToString(true) + " on scene " +
_scene.ToString(true);
break;
case Type::SOURCE_HIDE:
msgBegin += "set source hide transition of " +
_source.ToString() + " on scene " +
_scene.ToString();
_source.ToString(true) + " on scene " +
_scene.ToString(true);
break;
}
if (_setDuration) {