logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Sosnin" <ROMA...@il.ibm.com>
Subject Failing to initialize log4j2 configuration dynamically
Date Sun, 18 Jun 2017 10:00:15 GMT
Failing to initialize log4j2 configuration dynamically - supplying a JSON 
configuration node while json nodes are in random order.

Environment: Linux - CentOS 6
Component/s: Configurators
Affects Version/s: 2.8.1 

For example, this one works for me:
{ "status":"...", "name":"...", "properties":"...", "appenders":"...", 
"loggers":"..." } 
But this one fails:
{ "status":"...", "name":"...", "appenders":"...", "loggers":"...", 
"properties":"..." } 
PAY ATTENTION: "properties" node is the last node and not 3rd.
Initializing the config programmatically this way:
JsonNode logObject = 
InputStream stream = new 
ConfigurationSource source = new ConfigurationSource(stream);
Configuration ourConfig = new 
JsonConfiguration(LoggerContext.getContext(), source);
where logObject is the actual log4j2 JSON config node.
Any thoughts? Bug? API Misuse?


Roman Sosnin
Backend Server Side Developer
Trusteer Security
IBM Israel Software Lab
Office: +972-(0)74-7922783

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message