Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Open Source Projects
Search Coderanch
Advance search
Google search
Register / Login
This week's book giveaway is in the
Design and Architecture
forum.
We're giving away four copies of
Communication Patterns: A Guide for Developers and Architects
and have Jacqui Read on-line!
See
this thread
for details.
Win a copy of
Communication Patterns: A Guide for Developers and Architects
this week in the
Design and Architecture
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Devaka Cooray
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
paul wheaton
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Carey Brown
Mikalai Zaikin
Bartenders:
Lou Hamers
Piet Souris
Frits Walraven
Forum:
Other Open Source Projects
log level parameter?
Ra Carter
Ranch Hand
Posts: 96
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Is there a way to pass the log level as a parameter with commons logging?
I am looking for something like logger.log("message", logLevel).
Jaikiran Pai
Sheriff
Posts: 10445
227
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The
Javadoc of Apache commons logging Log interface
shows me that there are APIs like log.info(), log.debug() which can accomplish this. Are you looking for something else?
[
My Blog
] [
JavaRanch Journal
]
Ra Carter
Ranch Hand
Posts: 96
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Yes, I am looking for a single method call that can log to any level. For example:
logger.log("hello world", LogLevel.INFO);
Ra Carter
Ranch Hand
Posts: 96
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I found such a method in the log4j API:
new org.apache.log4j.Logger().log(Priority.DEBUG, "message");
I am interested in a commons logging interface.
ice is for people that are not already cool. Chill with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
regarding the web.xml
log hibernate sql statement
How to supress Runtime Exceptions
hello.ear created on sun one can't be deployed to Sun one application server!!
Is there a Java App server support O&M across the cluster
More...