users@glassfish.java.net

RE: Correct way to get domain logs path

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Thu, 19 Mar 2009 18:33:30 -0400

If you use Log4J you can establish a logger on the class or package
and use that CLASSLOADER e.g.
com.foo is package
Bar is class of com.foo
Logger barlogger = Logger.getLogger("com.foo.Bar");

http://logging.apache.org/log4j/1.2/manual.html
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung / Disclaimer and confidentiality note
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided.






Date: Thu, 19 Mar 2009 18:59:16 -0300
From: casmeiron_at_gmail.com
To: users_at_glassfish.dev.java.net
Subject: FW: Correct way to get domain logs path





FW: Correct way to get domain logs path


This is the correct way to ask this kind of question?



Thanks.

------ Forwarded Message

From: Paulo Cesar Silva Reis <casmeiron_at_gmail.com>

Date: Thu, 19 Mar 2009 11:27:58 -0300

To: "users_at_glassfish.dev.java.net" <users_at_glassfish.dev.java.net>

Subject: Correct way to get domain logs path



Hi,

I am trying to get (inside an application deployed by ear file) the logs path (log-root attribute on domain.xml file) to create a personal log on that directory.



The reason that I am using personal logs defined on application instead of domain.xml is that I couldn’t find a way to create a new log-service on domain.xml using something like ‘use-parent-handlers=false’ as I can do calling logger.setUseParentHandlers(false), I don’t want to have server logs on those files.



Anyone knows how to do that? (both way)



Thanks.



------ End of Forwarded Message


_________________________________________________________________
Windows Live™ Contacts: Organize your contact list.
http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009