diff --git a/es-core/src/components/BadgeComponent.cpp b/es-core/src/components/BadgeComponent.cpp index bde0fb284..e093c91e5 100644 --- a/es-core/src/components/BadgeComponent.cpp +++ b/es-core/src/components/BadgeComponent.cpp @@ -212,9 +212,10 @@ void BadgeComponent::applyTheme(const std::shared_ptr& theme, if (elem->has("horizontalAlignment")) { const std::string horizontalAlignment {elem->get("horizontalAlignment")}; if (horizontalAlignment != "left" && horizontalAlignment != "right") { - LOG(LogWarning) << "BadgeComponent: Invalid theme configuration, " - "property defined as \"" - << horizontalAlignment << "\""; + LOG(LogWarning) + << "BadgeComponent: Invalid theme configuration, property \"horizontalAlignment\" " + "for element \"" + << element.substr(7) << "\" defined as \"" << horizontalAlignment << "\""; } else { mFlexboxComponent.setAlignment(horizontalAlignment); @@ -224,9 +225,9 @@ void BadgeComponent::applyTheme(const std::shared_ptr& theme, else if (elem->has("alignment")) { const std::string alignment {elem->get("alignment")}; if (alignment != "left" && alignment != "right") { - LOG(LogWarning) - << "BadgeComponent: Invalid theme configuration, property defined as \"" - << alignment << "\""; + LOG(LogWarning) << "BadgeComponent: Invalid theme configuration, property \"alignment\"" + " for element \"" + << element.substr(7) << "\" defined as \"" << alignment << "\""; } else { mFlexboxComponent.setAlignment(alignment); @@ -236,9 +237,9 @@ void BadgeComponent::applyTheme(const std::shared_ptr& theme, if (elem->has("direction")) { const std::string direction {elem->get("direction")}; if (direction != "row" && direction != "column") { - LOG(LogWarning) - << "BadgeComponent: Invalid theme configuration, property defined as \"" - << direction << "\""; + LOG(LogWarning) << "BadgeComponent: Invalid theme configuration, property \"direction\"" + " for element \"" + << element.substr(7) << "\" defined as \"" << direction << "\""; } else { mFlexboxComponent.setDirection(direction); @@ -249,9 +250,9 @@ void BadgeComponent::applyTheme(const std::shared_ptr& theme, if (elem->has("lines")) { const unsigned int lines {elem->get("lines")}; if (lines < 1 || lines > 10) { - LOG(LogWarning) - << "BadgeComponent: Invalid theme configuration, property defined as \"" - << lines << "\""; + LOG(LogWarning) << "BadgeComponent: Invalid theme configuration, property \"lines\"" + " for element \"" + << element.substr(7) << "\" defined as \"" << lines << "\""; } else { mFlexboxComponent.setLines(lines); @@ -262,9 +263,10 @@ void BadgeComponent::applyTheme(const std::shared_ptr& theme, if (elem->has("itemsPerLine")) { const unsigned int itemsPerLine {elem->get("itemsPerLine")}; if (itemsPerLine < 1 || itemsPerLine > 10) { - LOG(LogWarning) << "BadgeComponent: Invalid theme configuration, " - "property defined as \"" - << itemsPerLine << "\""; + LOG(LogWarning) + << "BadgeComponent: Invalid theme configuration, property \"itemsPerLine\"" + " for element \"" + << element.substr(7) << "\" defined as \"" << itemsPerLine << "\""; } else { mFlexboxComponent.setItemsPerLine(itemsPerLine); @@ -276,9 +278,11 @@ void BadgeComponent::applyTheme(const std::shared_ptr& theme, if ((itemMargin.x != -1.0 && itemMargin.y != -1.0) && (itemMargin.x < 0.0f || itemMargin.x > 0.2f || itemMargin.y < 0.0f || itemMargin.y > 0.2f)) { - LOG(LogWarning) << "BadgeComponent: Invalid theme configuration, property " - "defined as \"" - << itemMargin.x << " " << itemMargin.y << "\""; + LOG(LogWarning) + << "BadgeComponent: Invalid theme configuration, property \"itemMargin\"" + " for element \"" + << element.substr(7) << "\" defined as \"" << itemMargin.x << " " << itemMargin.y + << "\""; } else { mFlexboxComponent.setItemMargin(itemMargin);