Solved

log4j, turning off logging in external library

Posted on 2006-06-16
2
275 Views
Last Modified: 2008-03-03
Hello,

I am using log4j in my own own code, and, I am using the ROME library for process RSS. Does anybody know what I should put in my log4j configuration file so that only my logger.debug(...) statements go to the output, but not the debug statements that are inside ROME?

Thanks,

Adrian.
0
Comment
Question by:adrianbasheer
2 Comments
 
LVL 6

Accepted Solution

by:
phuocnh earned 250 total points
Comment Utility
Hi  adrianbasheer!
I don't know about ROME library, I suppose that the library begins with org.rome or something is like that
if you use log4j.xml file you put the following lines
<category name="org.rome">
     <priority value="INFO"/> <-------you can use INFO, ERROR, WARN to prevent DEBUG information.
   </category>
into log4j.xml as the sub tag of <log4j:configuration> tag.
If you use log4j.properties you should use
log4j.category.org.rome = INFO, your_appender_name
Phuoc
0
 

Author Comment

by:adrianbasheer
Comment Utility
Hi,

Thanks a lot for your answer, now I understand things better.

Adrian.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
What is JNDI datasource in spring 1 36
topping2 challenge 13 54
Unable to start eclipse ? 17 80
eclipse java  build path 6 16
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now