Hi Ralph,

Below you can find the xml and properties File.
For xml File is ok, but for properties file doesn't work.

Can you help me in order to fix it?

PROPERTIES FILE:

appender.stdout.type = Console
appender.stdout.name = stdout
appender.stdout.layout.type = PatternLayout
appender.stdout.layout.pattern = %m%n


logger.HTTP_CLIENT.name=org.apache.http.headers
logger.HTTP_CLIENT.http.headers.level=debug
logger.HTTP_CLIENT.http.headers.appenderRef.stdout.ref = stdout
logger.HTTP_CLIENT.http.headers.additivity = false

XML FILE:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="ERROR">
        
  <Appenders>
    <Console name="STDOUT">
      <PatternLayout pattern="%d %-5level [%logger] %msg%n%xThrowable" />
    </Console>
  </Appenders>
  <Loggers>
    <Logger name="org.apache.http.headers" level="DEBUG">
      <AppenderRef ref="STDOUT"/>
    </Logger>
  </Loggers>

</Configuration>


On 2020/03/13 16:43:11, Ralph Goers <[email protected]> wrote: 
> Please supply the Log4j2 XML configuration that works.
> 
> Ralph
> 
> > On Mar 13, 2020, at 9:39 AM, EDMONDO SENA <[email protected]> wrote:
> > 
> > Hello,
> > 
> > we had a properties file (log4j) that used http apache.
> > The properties file (log4j) is the following:
> > 
> > 1) log4j.logger.httpclient.wire=ERROR
> > 
> > 2) log4j.logger.org.apache.http.wire = ERROR
> > 3) log4j.logger.org.apache.http.impl.conn = ERROR
> > 4) log4j.logger.org.apache.http.impl.client = ERROR
> > 5) log4j.logger.org.apache.http.client = ERROR
> > 
> > We have converted that file with log4j2 syntax to xml file and it works. 
> > But we've found that using the log4j2 properties file instead does not work.
> > In order to avoid having significant impacts on our system, 
> > Could you help me to write those lines (1 to 5) in log4j2 through the 
> > properties files?
> > 
> > Thanks.
> > //Edmondo.
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to