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
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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
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.
Consider Paul's
rocket mass heater
.
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...