Royan wrote:
> I'm logging exceptions with java.util.logging.Logger#log() (i can't
> use anything apart from standard Java API) and i don't want any stack
> trace to appear in stdout or stderr is there any way I can filter or
> redirect all output that is produced buy this method into the file
> only?
You can use Level.FINE to log exception and Level.INFO for others message.
Then you can configure the ConsoleHandler to output only the the message
above the INFO level and the FileHandler to output ALL messages.
These configurations are done in the logging.properties configuration file.
There is a global logging.properties file located in your {JRE}/lib
directory, but you can use your own with:
java -Djava.util.logging.config.file=mylogging.propertie s
--
Andrea Francia
http://www.andreafrancia.it/