You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2012/10/05 08:32:47 UTC
[jira] [Created] (SLING-2614) Specifying numeric log level through
command line does not work
Chetan Mehrotra created SLING-2614:
--------------------------------------
Summary: 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: Launchpad
Reporter: Chetan Mehrotra
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
[jira] [Resolved] (SLING-2614) Specifying numeric log level through
command line does not work
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger resolved SLING-2614.
--------------------------------------
Resolution: Fixed
Fix Version/s: Commons Log 3.0.2
Added proper conversion method to convert the log level configuration to a SlingLoggerLevel instance supporting both strings and numeric values.
Also added unit tests for the SlingLoggerLevel static conversion helper methods.
> 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
> Fix For: Commons Log 3.0.2
>
>
> 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
[jira] [Assigned] (SLING-2614) Specifying numeric log level through
command line does not work
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger reassigned SLING-2614:
----------------------------------------
Assignee: Felix Meschberger
> 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: Launchpad
> 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
[jira] [Updated] (SLING-2614) Specifying numeric log level through
command line does not work
Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
[ 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