mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
fix(logs): respect NO_COLOR for partition names
The partition name colors (e.g., Application:, NetworkOPs:) were ignoring the NO_COLOR environment variable and always applying color codes. Now both partition names and location suffixes properly respect should_log_use_colors() which honors NO_COLOR and terminal detection.
This commit is contained in:
@@ -360,7 +360,8 @@ Logs::format(
|
|||||||
if (!partition.empty())
|
if (!partition.empty())
|
||||||
{
|
{
|
||||||
#ifdef BEAST_ENHANCED_LOGGING
|
#ifdef BEAST_ENHANCED_LOGGING
|
||||||
output += beast::detail::get_log_highlight_color();
|
if (beast::detail::should_log_use_colors())
|
||||||
|
output += beast::detail::get_log_highlight_color();
|
||||||
#endif
|
#endif
|
||||||
output += partition + ":";
|
output += partition + ":";
|
||||||
}
|
}
|
||||||
@@ -392,7 +393,8 @@ Logs::format(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BEAST_ENHANCED_LOGGING
|
#ifdef BEAST_ENHANCED_LOGGING
|
||||||
output += "\033[0m";
|
if (beast::detail::should_log_use_colors())
|
||||||
|
output += "\033[0m";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
output += message;
|
output += message;
|
||||||
|
|||||||
Reference in New Issue
Block a user