karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamie Kemp (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-5116) Defining karaf.log.console as a log4j2 log level causes exceptions
Date Fri, 05 May 2017 08:34:04 GMT
Jamie Kemp created KARAF-5116:
---------------------------------

             Summary: Defining karaf.log.console as a log4j2 log level causes exceptions
                 Key: KARAF-5116
                 URL: https://issues.apache.org/jira/browse/KARAF-5116
             Project: Karaf
          Issue Type: Bug
    Affects Versions: 4.1.1
            Reporter: Jamie Kemp
            Priority: Minor


Running karaf 4.1.1, defining karaf.log.console as DEBUG to switch on the console appender
(to get to logging when running under pax-exam) results in the following exceptions:

{code}
java.lang.IllegalArgumentException: Bad level "DEBUG"
        at java.util.logging.Level.parse(Level.java:482)
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlersInternal(BootstrapLogManager.java:109)
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlers(BootstrapLogManager.java:70)
        at org.apache.karaf.main.util.BootstrapLogManager.configureLogger(BootstrapLogManager.java:75)
        at org.apache.karaf.main.Main.launch(Main.java:244)
        at org.apache.karaf.main.Main.main(Main.java:178)
java.lang.IllegalArgumentException: Bad level "DEBUG"
        at java.util.logging.Level.parse(Level.java:482)
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlersInternal(BootstrapLogManager.java:109)
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlers(BootstrapLogManager.java:70)
        at org.apache.karaf.main.util.BootstrapLogManager.configureLogger(BootstrapLogManager.java:75)
        at org.apache.karaf.main.KarafActivatorManager.<init>(KarafActivatorManager.java:49)
        at org.apache.karaf.main.Main.launch(Main.java:280)
        at org.apache.karaf.main.Main.main(Main.java:178)
java.lang.IllegalArgumentException: Bad level "DEBUG"
        at java.util.logging.Level.parse(Level.java:482)
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlersInternal(BootstrapLogManager.java:109)
        at org.apache.karaf.main.util.BootstrapLogManager.getDefaultHandlers(BootstrapLogManager.java:70)
        at org.apache.karaf.main.util.BootstrapLogManager.configureLogger(BootstrapLogManager.java:75)
        at org.apache.karaf.main.lock.SimpleFileLock.<init>(SimpleFileLock.java:40)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at org.apache.karaf.main.Main.createLock(Main.java:476)
        at org.apache.karaf.main.Main.doMonitor(Main.java:378)
        at org.apache.karaf.main.Main.access$100(Main.java:75)
        at org.apache.karaf.main.Main$3.run(Main.java:369)
{code}

Looks like BootstrapLogManager attempts to use java.util.logging levels which DEBUG is not
one of them. This however does result in valid logging out via log4j2 to the console appender.


Using a valid java.util.logger level (tried FINE during testing) results in logging to the
console from 'SimpleFileLock' but nothing from log4j2.




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message