Search within Open Source Projects
Register / Login
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Other Open Source Projects
Showing message only on console, not to be written in log file
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
I have a
class for which im defined logger in the the class itself--
private static final Logger LOG = Logger.getLogger(myClass.class);
Now for looging defined log4.properties, in which defined rootlogger, corresponding appenders and other appender properties.
In code i used LOG.warn(), which is shown on console and wrote to file also.
But in one particular case i need to use LOG.warn() in such a way so that the log message will only shown on console but not to be write in the file.
Is there a way to do this?
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
Boost this thread!
Question about Logging
Naming logger instances
Redirecting messages to a file ... append
Need help with log4j logging tool to log into database
log4j:WARN No appenders could be found for logger (log4jexample.LogExample).