Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

log4j, turning off logging in external library

Posted on 2006-06-16
2
Medium Priority
?
307 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 1000 total points
ID: 16926225
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
ID: 16932774
Hi,

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

Adrian.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
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:
Suggested Courses

886 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