为什么将log4j复制到lib下后还出现statusloggerlib test log4j.jar2 could not find a logging

wei wang created LOG4J2-365:-------------------------------Summary: ERROR StatusLogger Unable to locate a logging implementation, using SimpleLoggeKey: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerFix For: 2.0-beta7I have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)How ever when I try to run :java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Remko Popma edited comment on LOG4J2-365 at 8/20/13 9:43 AM:-------------------------------------------------------------* should your classpath not be: -cp "launcher.lib/*" ? (with a slash between lib and the star, and no space between ';' and 'lib'?)* does the lib directory contain log4j-core-2.0-beta8.jar?was (Author: ***@):* should your classpath not be: -cp "launcher.lib/*" ? (with a slash between lib and the star?)* does the lib directory contain log4j-core-2.0-beta8.jar?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Remko Popma commented on LOG4J2-365:------------------------------------* should your classpath not be: -cp "launcher.lib/*" ? (with a slash between lib and the star?)* does the lib directory contain log4j-core-2.0-beta8.jar?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------The command can be run without any problem and the lib included log4j-core-2.0-beta8.jar.The problem is when try to run launcher.jar (no logging implementation) and start oamcli.jar(with logging implementation). The log4j2.xml does not work any more.I do not know why?
Should I implement the logging in launcher.jar source code as well in order to activate the log4j2?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------Hi again,If I only run oamcli.jar alone, the logging log4j2.xml is working fine!ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Remko Popma commented on LOG4J2-365:------------------------------------I guess it depends on what your launcher thing does...Are you starting another java process from the first java process?If that's the case are you passing the correct classpath and system properties to your child process?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------How to passing the properties?I have the logging implementation in the child process and jar file with the log4j2.xml when build.[esekilxxen1312 /proj/oamwind/eweiwan_delivery/CLITOOL-SIM_CXS123456_X/CLITOOL_CXP2000001/CLITOOLWRAPPER_CXC1111111/emcli ]jar tvf oamCliClient.jar2572 Tue Aug 20 10:15:08 CEST 2013 META-INF/MANIFEST.MF2415 Tue Aug 20 10:15:08 CEST 2013 META-INF/EMAS.SF2383 Tue Aug 20 10:15:08 CEST 2013 META-INF/EMAS.DSA0 Tue Aug 20 10:15:10 CEST 2013 META-INF/0 Tue Aug 20 10:15:08 CEST 2013 com/0 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/0 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/0 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/0 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/com/0 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/common/0 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/launch/0 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/moshell/0 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/session/1259 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/HelloWorld.class3930 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/com/CommandThread.class410 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/com/CommandThreadFactory.class857 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/com/ConnectionManager.class2132 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/com/ConnectionManagerFactory.class2942 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/com/ConnectionManagerForLinux.class8879 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/com/ConnectionManagerForWindows.class1199 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/com/PortHandler$1.class4663 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/com/PortHandler.class5525 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/common/Trace.class143 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/common/Utils.class2868 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/launch/CliWrapper.class1352 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/launch/LauncherData.class1310 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/moshell/MoShellData.class461 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/moshell/MoShellManager.class600 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/moshell/MoShellManagerFactory.class2295 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/moshell/MoShellManagerImpl.class379 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/session/Session.class941 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/session/SessionFactory.class5956 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/session/SessionImpl.class1196 Tue Aug 20 10:15:08 CEST 2013 log4j2.xml27 Tue Aug 20 10:15:08 CEST 2013 oamCliClient.properties[esekilxxen1312 /proj/oamwind/eweiwan_delivery/CLITOOL-SIM_CXS123456_X/CLITOOL_CXP2000001/CLITOOLWRAPPER_CXC1111111/emcli ]When the parent process call the child process, the how the log4j2 will work?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------By the way, the path should be lib\*ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------Hi Remo, path I mean should be lib\\*
why / could not be shown?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------The complete cmd:"C:\Program Files (x86)\Java\jre6\bin\"java -Dlog4j.configurationFile="C:\Users\eweiwan\log4j2.xml" -cp "C:\Users\eweiwan\Ericsson\starter\launcher. C:\Users\eweiwan\*"
se.ericsson.security.starter.Starter /emcli/clitool_config.xml
icon_EM_16.gif
hostname=147.214.45.181:9772ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------The result is:2013-aug-20 14:00:49 se.ericsson.security.launcher.Launcher runApplicationOrResourcINFO: Required EM Launcher: CXCABERROR StatusLogger Unable to locate a logging implementation, using SimpleLoggerERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------Hi Remo,I have even tried with the hardcoded configuration in source code:static {System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY,System.getProperty("user.home"));}and put the log4j2.xml at user.home .But still did not solve the problem!ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Ralph Goers commented on LOG4J2-365:------------------------------------The problem isn't that it can't find your configuration file. It can't seem to find log4j-core. The API locates logging implementations by searching for META-INF/log4j-provider.properties in the classpath. The log4j-core jar has the file inside it. For some reason in your setup it doesn't seem to be finding the file.ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------Hi Ralph,In my -cp
"C:\Users\eweiwan\*"
log4j-core and log4j-api
jar files.log4j-1.2-api-2.0-beta8.jarlog4j-core-2.0-beta8.jarWill that be enough?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------C:\Users\eweiwan\*ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------C:\Users\eweiwan
forwardslash
*ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------C:\Users\eweiwan\\*ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Ralph Goers commented on LOG4J2-365:------------------------------------Can you create a sample app that has this problem and attach it to this issue?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Ralph Goers edited comment on LOG4J2-365 at 8/20/13 2:57 PM:-------------------------------------------------------------Can you create a sample app that has this problem and attach it to this issue? I'd really need to see what launcher.jar is doing to know what is going on. Does it have any logging that you can enable?was (Author: ***@):Can you create a sample app that has this problem and attach it to this issue?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------Hi Ralph,The launcher.jar has no log4j2
logging implementation. It calls
oamCli.jar which has log4j2 implementation in start thread. At the entrance class I had code :static{ System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, System.getProperty("user.home")+ File.Separator +"log4j2.xml"); }so the log4j2.xml file is located at "user.home"I even used -Dlog4j.configurationFile="C:\Users\eweiwan\log4j2.xml"The error message is still printed out by the simplelog at console.Do you have an example of cmd
which set the classpath for log4j-core*.jar that worked ?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Remko Popma commented on LOG4J2-365:------------------------------------You're using launcher to start a child process.You want to do logging in the child process, so the api and core jars need to be in the classpath of the *child process*.Lets start by finding out what the classpath of your child process is.Somewhere in your child process, can you print the system property for the java classpath to the console? Does it contain the log4j api and core jars?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Remko Popma commented on LOG4J2-365:------------------------------------Here is an example launcher that makes sure the log4j jars are in the classpath of the child process:{code}import java.io.BufferedRimport java.io.InputStreamRimport org.apache.logging.log4j.LogMimport org.apache.logging.log4j.Lclass ChildProcess {public static void main(String[] args) throws Exception {Logger log = LogManager.getLogger(ChildProcess.class);log.error("Hello world!");}}public class Launcher {public static void main(String[] args) throws Exception {ProcessBuilder pb = new ProcessBuilder( //"java", //"-Dlog4j.configurationFile=log4j2.xml", //// THIS IS IMPORTANT!// Log4j jars must be in classpath of CHILD process!//// One (easy) way to do this is to pass the classpath of// the parent process to child process...// Then start laucher with the log4j jars in the classpath."-cp", System.getProperty("java.class.path"), ////// Another way would be to set the individual jars & directories...//"-cp", "lib/log4j-api-2.0-beta8.lib/log4j-core-2.0-beta8.jar",// class name of the child processChildProcess.class.getName());pb.redirectErrorStream(true); // merge System.out and System.errfinal Process process = pb.start();final boolean[] stop = { false };printProcessOutput(process, stop);process.waitFor();stop[0] =}private static Thread printProcessOutput(final Process process,final boolean[] stop) {Thread t = new Thread("OutputWriter") {@Overridepublic void run() {BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));try {String line =while (!stop[0] && (line = in.readLine()) != null) {System.out.println(line);}} catch (Exception ignored) {}}};t.start();}}{code}This child process logs correctly to the console. Here is the command:{code}java -lib/log4j-api-2.0-beta8.lib/log4j-core-2.0-beta8.jar a.Launcher{code}I get the following output:{code}09:37:51.310 [main] ERROR a.ChildProcess - Hello world!{code}ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------I am running the jar at windows7, so if I set the environment variable %CLASSPATH% to where the log4j.jars, if I do not touch the laucher.jar source code, is there anyway to make it work?I feel that we are almost there! Thx!ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------The difference is that my Child process packed in a jar file (with log4j2.xml) while in your example ,both parent and child are in the same package.I will try to System.out.println(System.getProperty("java.class.path"))ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------Due to the reason, I could not change the launcher.jar source code. How to make the child process still working? Dynamically set the classpath in child process? I had tried to put the code in child classstatic{ System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, System.getProperty("user.home")+ File.Separator +"log4j2.xml"); }It appeared that child process can find the log4j-core and api otherwise classnotFoundException will ocurr.ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Remko Popma commented on LOG4J2-365:------------------------------------Somewhere in your child process, can you print the system property for the java classpath to the console?Is it the same as your environment variable %CLASSPATH%?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------Hi Remko,Now I come to the basic things you have mentioned from the very beginning!
The -cp should not have any space after ";"
after remove the space it works !!! Sorry :)I will continue to look into how to deal with the lib\log4j-*.jar could be delivered with my child.jar(otherwise the user will have to download log4j2 package them by themselves).I used ant to build the jar however, it is not allowed to have serveral META-INF built so I have to excludes=META-INF/**/* in the ant build which cause the problem for log4j to read the properties file in the lib.I have unpacked the lib\log4j-*.jar and repack them again with the child.class. No compile error but missing log4j.properties in META-INFO ? (I did not know it is needed).&zipfileset src="lib\log4j-core-2.0-beta7.jar" includes="**/*.class excludes="META-INFO/**/*" /&"&zipfileset src="lib\log4j-api-2.0-beta7.jar" includes="**/*.class excludes="META-INFO/**/*" /&"ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------Hi Remko,I have print out the "classpath" and "java.class.path ", they are not the same!However,I have the log4j2.xml built in the same path as the child.classes in the child.jar, but still could not detect the log4j2.xml---------------------------------------------------------------------------------------...379 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/session/Session.class941 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/session/SessionFactory.class5956 Tue Aug 20 10:15:08 CEST 2013 com/ericsson/rbs/clitool/session/SessionImpl.class1196 Tue Aug 20 10:15:08 CEST 2013 log4j2.xml
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&here27 Tue Aug 20 10:15:08 CEST 2013 oamCliClient.properties--------------------------------------------------------------------------------------------------what makes it work is to edit in the child class source code with:static{ System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, System.getProperty("user.home")+ File.Separator +"log4j2.xml"); }conclusion: If log4j2.xml packed in a jar file, it will not work! It must be specified at cmd -Dlog4j.....
or to make a setting in the source code as above.question: How to embed the external lib log4jxxx.jar in my child.jar so that logging would still work ? Any best practice there?ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Remko Popma commented on LOG4J2-365:------------------------------------if the log4j2.xml file is inside a jar, you could try to specify the location like this:{{jar:file:/C:/path/to/jarfile.jar!path/in/jar/log4j2.xml}}WARNING: I strongly recommend against unzipping the log4j jar files and zipping them back up into a custom jar! It is open source, you can use it any way you want of course, but I certainly don't want to support it...The log4j jar files contain lots of other files, not just .class files. Log4j NEEDS those other files to work properly. Again, if you unzip the jars, strip out or change config files, and then zip the result back up into a custom file, I have no idea what will happen. It may work, it may not. Or even worse, it will work a little until after you ship to your users, and then your users run into problems because they run on different configurations than you imagined...ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------Thanks!I'd like to have this solution:static{ System.setProperty(XMLConfigurationFactory.CONFIGURATION_FILE_PROPERTY, System.getProperty("user.home")+ File.Separator +"log4j2.xml"); }Hope it will not have any side-effect.ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Ralph Goers commented on LOG4J2-365:------------------------------------I'm a bit confused. You said you would like the log4j2.xml inside of a jar.
$user.home\log4j2.xml will never resolve into a path inside of a jar.ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]Ralph Goers edited comment on LOG4J2-365 at 8/22/13 12:10 AM:--------------------------------------------------------------I'm a bit confused. You said you would like the log4j2.xml inside of a jar.
$user.home\log4j2.xml will never resolve into a path inside of a jar.Also, I am wondering if there is still a problem here that needs to be solved. The title of the issue is for being unable to locate the logging implementation but from what I can tell that has been resolved.was (Author: ***@):I'm a bit confused. You said you would like the log4j2.xml inside of a jar.
$user.home\log4j2.xml will never resolve into a path inside of a jar.ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment- ]wei wang commented on LOG4J2-365:---------------------------------Yes the problem has been solved, thanks for the your support.Conclusion:I will not build the lib log4jxxx.jar into my child.jar because of the potential risk mentioned by Remko.I will put the log4jxxx.jar in my classpath and use
$user.home\log4j2.xml to configure the logging.ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Raw Message
[ https://issues.apache.org/jira/browse/LOG4J2-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]wei wang closed LOG4J2-365.---------------------------Resolution: FixedThe the classpath and use lib separately(no jar in jar)ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogge-------------------------------------------------------------------------------Key: LOG4J2-365URL: https://issues.apache.org/jira/browse/LOG4J2-365Project: Log4j 2Issue Type: QuestionComponents: log4j 1.2 emulationAffects Versions: 2.0-beta7Environment: windows7Reporter: wei wangPriority: BlockerLabels: ERROR, SimpleLogge, StatusLogger, Unable, a, implementation,, locate, logging, to, usingFix For: 2.0-beta7Original Estimate: 12hRemaining Estimate: 12hI have problem to make the logging work with the log4j2.xml
when packing into jar file.I have launcher.jar which calls oamcli.jar(has logging implementation and log is working in eclipse)java -Dlog4j.configurationFile=path\to\log4j2.xml
"launcher. lib\*" .....I got a "ERROR StatusLogger Unable to locate a logging implementation, using SimpleLogger"Please give me some advice and where to look for the answer.Thanks!--This message is automatically generated by JIRA.If you think it was sent incorrectly, please contact your JIRA administratorsFor more information on JIRA, see: /software/jira
Loading...

我要回帖

更多关于 log4j 日志级别 的文章

 

随机推荐