2024年2月6日发(作者:)
Did you already got the answer?Their is nearly every possible1
solution explained, so it wouldbe interesting, whether onehelped. – user357206 Sep 2 '10at 7:52add a comment11 Answersactive oldest votesGo to Run configurations in your eclipse then -VM arguments add this: -uration=log4j-config_folder/otereplace log4j-config_folder with your folder structure where you have your file11answered Aug 17 '10 at 12:24downvoteshare|improve this answerHuzi--- Javiator51945Thanks for the suggestion. This way it worked! Although I'm still a bit annoyed for tworeasons: 1) I thought if I used the ure() I didn't have to botherhaving the ties 2) When I run a simple JUnit test I just want to right clik and "run", not having to define a configuration I've tried again my original test, but adding thefollowing line to see if it was using some variable defined somewhere in Eclipse:n(perty("uration")); But it prints out "null" –
javaExpert Aug 17 '10 at 13:50 hmmm.. interesting.. k ll get back to yu – Huzi--- Javiator Aug 18 '10 at 8:59add a commentLook in the
ties or
file for the log level. It's probably set to
ERROR instead ofDEBUGupvoteanswered Aug 17 '10 at 10:158downshare|improve this answervoteAaron Digulla153k36236405Thanks for the reply Aaron. I have checked the ties and it was set on INFO. Ihave now changed it to DEBUG, but it doesn't make any difference. Any other idea?gger=DEBUG, stdout1 ==sionPattern=%t:%d{ddMMMyy HH:mm:} %-5p(%F:%L) %m%n – javaExpert Aug 17 '10 at 10:23add
- to your VM environment startup properties to have log4j print out it'sdebugging info - perhaps a different log4j configuration file is being picked up on the10
classpath (such as one bundled inside a JAR) than the one you intend – matt b Aug 17'10 at 11:35@javaExpert: In that case, it find a different ties somewhere on the into your JARs, too! – Aaron Digulla Aug 17 '10 at 12:23add a comment
up vote 5down voteOne thing to note, if you have a ties file on your classpath you do not need tocall BasicConfigurator. A description of how to configure the properties file is could pinpoint whether your IDE is causing the issue by trying to run this class from the
command line with and ties on your classpath.
本文发布于:2024-02-06 23:34:18,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170723365962802.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |