users@glassfish.java.net

glassfish and logging

From: <glassfish_at_javadesktop.org>
Date: Sun, 19 Apr 2009 01:05:00 PDT

Ok, read a lot of postings here about the captioned, I have a conclusion that it is not possible to store logs of my application to a file seperate from the server's own logs. I can change the server.log file to something else, but still the logs are stored together with the server's own logs. If this is not correct, please teach me how to separately store them.

If this is correct, I believe Glassfish's design is to use the Log Viewer to filter what you don't want and list we you want. That's why they don't need to be separate. I think I have to live with this until they aware that there are some that perfer a separate file.

With this, I also find that in the log viewer, there is an Instance Name in the search criteria. In default, two options are available: <blank> and "server". I don't know if I can create my own instance and then select it here to only display the logs from my application. How can this be done?

I've tried this:
        Logger log = Logger.getLogger("myLog");
        log.info("my UtilBean running");
But it still shown up in the "server" instance name only.
[Message sent by forum member 'senderj' (senderj)]

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