Hi,

It thinks it's related to the sshd logger to avoid infinite loop.

You can take a look on: https://issues.apache.org/jira/browse/KARAF-5790

Can you please try to add the following loggers:

      <Logger name="org.apache.aries.spifly" level="warn"
additivity="false">
         <AppenderRef ref="KARAF_LOG_FILE"/>
      </Logger>
      <Logger name="org.apache.sshd" level="info" additivity="false">
         <AppenderRef ref="KARAF_LOG_FILE"/>
      </Logger>
      <Logger name="org.apache.karaf.jaas.modules.audit" level="info"
additivity="false">
         <AppenderRef ref="AUDIT_LOG_FILE"/>
      </Logger>

Regards
JB



On 11/12/2018 20:55, Castor wrote:
> Hello! I'm trying to use a log4j2.xml file with karaf 4.1.7. I've created it
> following the manual, but i'm having a problem with it, the file appender
> works as expected, but the log:tail and log:display don't, it throws the
> following exception: 
> 
> java.lang.RuntimeException: Unable to set level for logger
>         at
> org.apache.karaf.log.core.internal.LogServiceLog4j2XmlImpl.setLevel(LogServiceLog4j2XmlImpl.java:131)
> [124:org.apache.karaf.log.core:4.1.7]
>         at
> org.apache.karaf.log.core.internal.LogServiceImpl.setLevel(LogServiceImpl.java:106)
> [124:org.apache.karaf.log.core:4.1.7]
>         at
> org.apache.karaf.log.command.DisplayLog.execute(DisplayLog.java:74)
> [124:org.apache.karaf.log.core:4.1.7]
>         at
> org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)
> [133:org.apache.karaf.shell.core:4.1.7]
>         at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)
> [133:org.apache.karaf.shell.core:4.1.7]
>         at
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)
> [133:org.apache.karaf.shell.core:4.1.7]
>         at
> org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:571)
> [133:org.apache.karaf.shell.core:4.1.7]
>         at
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:497)
> [133:org.apache.karaf.shell.core:4.1.7]
>         at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:386)
> [133:org.apache.karaf.shell.core:4.1.7]
>         at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417)
> [133:org.apache.karaf.shell.core:4.1.7]
>         at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229)
> [133:org.apache.karaf.shell.core:4.1.7]
>         at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)
> [133:org.apache.karaf.shell.core:4.1.7]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> [?:?]
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [?:?]
>         at java.lang.Thread.run(Thread.java:748) [?:?]
> Caused by: org.w3c.dom.DOMException: NOT_FOUND_ERR: Houve uma tentativa de
> fazer referência a um nó em um contexto no qual ele não existe.
>         at
> com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(ParentNode.java:366)
> ~[?:?]
>         at
> com.sun.org.apache.xerces.internal.dom.ParentNode.insertBefore(ParentNode.java:288)
> ~[?:?]
>         at
> org.apache.karaf.log.core.internal.LogServiceLog4j2XmlImpl.insertIndented(LogServiceLog4j2XmlImpl.java:160)
> ~[?:?]
>         at
> org.apache.karaf.log.core.internal.LogServiceLog4j2XmlImpl.setLevel(LogServiceLog4j2XmlImpl.java:121)
> ~[?:?]
>         ... 15 more
> 
> 
> and here is the file:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <Configuration status="info">
>     <Appenders>
>         <RollingFile name="out" fileName="data/log/karaf.log"
>               append="true"
> filePattern="data/log/%d{yyyy-MM-dd}_karaf.%i.log">
>            <PatternLayout>
>              <Pattern>%d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id}
> - %X{bundle.name} - %X{bundle.version} | %m%n</Pattern>
>            </PatternLayout>
>            <Policies>
>                 <TimeBasedTriggeringPolicy />
>            </Policies>
>         </RollingFile>
>         <PaxOsgi name="paxosgi" filter="*"/>
>     </Appenders>
>     <Loggers>
>         <Root level="info">
>             <AppenderRef ref="out"/>
>             <AppenderRef ref="paxosgi"/>
>         </Root>
>     </Loggers>
> </Configuration>
> 
> Should i raise a JIRA for that?
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
> 

-- 
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to