Skip to content

Commit 27cebeb

Browse files
authored
Core/Logging: restore appender flags (regression from f95a8bf).
1 parent 4455231 commit 27cebeb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/common/Logging/Log.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,17 @@ void Log::CreateAppenderFromConfig(std::string const& appenderName)
9595
return;
9696
}
9797

98+
if (size > 2)
99+
{
100+
if (Optional<uint8> flagsVal = Trinity::StringTo<uint8>(tokens[2]))
101+
flags = AppenderFlags(*flagsVal);
102+
else
103+
{
104+
fprintf(stderr, "Log::CreateAppenderFromConfig: Unknown flags '%s' for appender %s\n", std::string(tokens[2]).c_str(), name.c_str());
105+
return;
106+
}
107+
}
108+
98109
try
99110
{
100111
Appender* appender = factoryFunction->second(NextAppenderId(), name, level, flags, tokens);

0 commit comments

Comments
 (0)