struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralf Bode <ralleb...@yahoo.de>
Subject Re: Logging in own Classes
Date Sat, 17 Jan 2004 10:34:58 GMT
Hi Manfred,

thanks!

i thougth its a bit offtopic.
sorry for that...

but i read in german-book
"Java Framework für Webanwendungen"
(haiges et. al)
something about logging...

there they use
servletContext.getRealPath("/WEB-INF/logging.properties");
for there own actionServlet.

but getRealPath() gets "null" in my case
(WAR with ant-tomcat-install)

so i will try your tips!

thanks again!
ralf


 --- Manfred Wolff <mail@manfred-wolff.de> schrieb: >
Ralf.
> 
> Its a little bit off topic. Log4J offers several
> possibilities for 
> configuration. The simplest way is just place your
> file into the 
> $CLASSPATH e.g. WEB-INF/classes. In this case your
> file MUST named 
> log4j.properties. At the first attach the log4j
> Framework searches such 
> a file to configure itself. The other resolution is
> to pass a system 
> parameter calledlog4j.configuration to your VM.
> 
> Other possibilities you can show here:
> 
> http://logging.apache.org/log4j/docs/manual.html
> 
> navigate to the section "configuration".
> 
> Manfred
> 
> Ralf Bode wrote:
> 
> >Hi all,
> >
> >i want to log something
> >in my own classes (MyAction e.g.)
> >
> >but i dont know how can i set Appenders etc.
> >
> >in "normal" applications i can load
> >with:
> >
>
>PropertyConfigurator.configure("/WEB-INF/logging.properties");
> >
> >log4j-settings but in struts (or is it tomcat?)
> >the file will be ignored...
> >
> >
> >okay there is LogFactory in struts.
> >but which logger do i "activate" ?
> >Log log = LogFactory.getLogger( ??? );
> >very strange ...
> >
> >any one a idea what to do, do get my
> >"own"-logging-facility ? 
> >
> >thanks
> >
> >ralf
> >
>
>__________________________________________________________________
> >
> >Gesendet von Yahoo! Mail - http://mail.yahoo.de
> >Mit Yahoo! Suche finden Sie alles:
> http://suche.yahoo.de
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >  
> >
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
>  

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Mit Yahoo! Suche finden Sie alles: http://suche.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message