Denis Treskunov created LOG4J2-94:
-------------------------------------

             Summary: Variable substitution: ${sys:foo} defaults to <property 
name=":foo">, should default to <property name="foo">
                 Key: LOG4J2-94
                 URL: https://issues.apache.org/jira/browse/LOG4J2-94
             Project: Log4j 2
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.0-beta1
            Reporter: Denis Treskunov
             Fix For: 2.0-beta2


The following configuration doesn't work (${sys:log.level} can't be resolved 
even though default value is provided).

<?xml version="1.0" encoding="UTF-8"?>
<configuration status="OFF">
  <properties>
    <property name="log.level">error</property>
    <property name=":log.level">ACTUALLY_GETS_USED</property>
  </properties>
  <appenders>
    <Console name="Console" target="SYSTEM_OUT">
      <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - 
%msg%n"/>
    </Console>
  </appenders>
  <loggers>
    <root level="${sys:log.level}">
      <appender-ref ref="Console"/>
    </root>
  </loggers>
</configuration>


In org.apache.logging.log4j.core.lookup.Interpolator.lookup(LogEvent, String), 
on line 110,
var = var.substring(prefixPos) should be var = var.substring(prefixPos + 1) 
instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to