[ 
https://issues.apache.org/jira/browse/SLING-2614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Felix Meschberger updated SLING-2614:
-------------------------------------

          Component/s:     (was: Launchpad)
                       Commons
    Affects Version/s: Commons Log 3.0.0
    
> Specifying numeric log level through command line does not work
> ---------------------------------------------------------------
>
>                 Key: SLING-2614
>                 URL: https://issues.apache.org/jira/browse/SLING-2614
>             Project: Sling
>          Issue Type: Bug
>          Components: Commons
>    Affects Versions: Commons Log 3.0.0
>            Reporter: Chetan Mehrotra
>            Assignee: Felix Meschberger
>            Priority: Minor
>
> While specifying the log level through command line 
> java -jar org.apache.sling.launchpad-7-SNAPSHOT-standalone.jar -l 4
> Following exception is logged
> ERROR: Bundle org.apache.sling.commons.log [74] Error starting 
> slinginstall:org.apache.sling.commons.log-3.0.0.jar 
> (org.osgi.framework.BundleException: Activator start error in bundle 
> org.apache.sling.commons.log [74].)
> java.lang.IllegalArgumentException: No enum const class 
> org.apache.sling.commons.log.internal.slf4j.SlingLoggerLevel.4
>         at java.lang.Enum.valueOf(Enum.java:196)
>         at 
> org.apache.sling.commons.log.internal.slf4j.SlingLoggerLevel.valueOf(SlingLoggerLevel.java:23)
>         at 
> org.apache.sling.commons.log.internal.slf4j.LogConfigManager.updateLoggerConfiguration(LogConfigManager.java:482)
>         at 
> org.apache.sling.commons.log.internal.slf4j.LogConfigManager.updateGlobalConfiguration(LogConfigManager.java:272)
>         at 
> org.apache.sling.commons.log.internal.slf4j.LogConfigManager.setDefaultConfiguration(LogConfigManager.java:144)
>         at 
> org.apache.sling.commons.log.internal.LogManager.<init>(LogManager.java:82)
>         at 
> org.apache.sling.commons.log.internal.Activator.start(Activator.java:39)
>         at 
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
>         at org.apache.felix.framework.Felix.activateBundle(Felix.java:1977)
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:1895)
>         at 
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)
>         at 
> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)
>         at java.lang.Thread.run(Thread.java:662)
> The issue occurs because in Main and MainDelegate the value specified for -l 
> is directly used. It should be first converted to String using the logLevel 
> array and then set.
> Workaround - Use the string version
> java -jar org.apache.sling.launchpad-7-SNAPSHOT-standalone.jar -l DEBUG

--
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

Reply via email to