users@glassfish.java.net

Logging per Application

From: <glassfish_at_javadesktop.org>
Date: Thu, 06 Aug 2009 07:09:01 PDT

Hi,

I have the problem, that I like to have a seperate log for each application im my domain and I want to use java.util.logging for that.

I tried to configure java.util.logging with a logging.properties file:

[code]
handlers= java.util.logging.FileHandler,java.util.logging.ConsoleHandler

.level= INFO

java.util.logging.FileHandler.pattern = D:/temp/loggingtest.log
java.util.logging.FileHandler.level = ALL
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter

java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
[/code]

I added the VM Argument and my file is created, but stays empty while the console shows all my log messages.

If this finally works one day I planned to add special handlers for my packages:

[code]
com.testpackage1.pattern = D:/temp/log1.log
com.testpackage1.formatter = java.util.logging.SimpleFormatter

com.testpackage2.pattern = D:/temp/log2.log
com.testpackage2.formatter = java.util.logging.SimpleFormatter
[/code]

Can anybody help me?
Thx Markus
[Message sent by forum member 'mweiss' (mweiss)]

http://forums.java.net/jive/thread.jspa?messageID=359221