You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Amit Gupta <am...@computerware.co.in> on 2004/12/28 07:29:32 UTC

[OT] I need to configure logs on my virtual hosting

Hi,

 

I need to configure logs on my virtual hosting. How can I do it? Till now logs are created at global logs directory to which I don't have access. I need logs in my webapps directory.

 


RE: [OT] I need to configure logs on my virtual hosting

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Amit,

Can you define what you mean by 'needing logs'?  Struts (recent versions)
uses common logging so you could check the Struts site or Wiki on how to
turn that on.  If you add commons logging to your own webapp, one
configuration file can log all important struts and webapp errors to the log
file of your choosing.  For virtual host logging, it depends on your
Container.  For example, in Apache Tomcat servers, you can go into the
server's configuration files and add a Logger configuration component to
redirect error messages for a virtual host (a context with Alias) to a
particular file.  Then, when your application prints out standard error
messages or (gasp!) System.out messages, they would go by default to that
particular log file (per virtual host if you set up logger instances for
each).

More details on Tomcat Loggers at:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/logger.html

More details on Tomcat Alias (and virtual hosts) at:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html
(Aliases at that page's section "Host Name Aliases".

For other containers' virtual host settings, go read their manuals.  This
was just an accurate Tomcat example. :)

Regards,
David

-----Original Message-----
From: Amit Gupta [mailto:amit.gupta@computerware.co.in]
Sent: Tuesday, December 28, 2004 1:30 AM
To: Struts Users Mailing List
Subject: [OT] I need to configure logs on my virtual hosting


Hi,



I need to configure logs on my virtual hosting. How can I do it? Till now
logs are created at global logs directory to which I don't have access. I
need logs in my webapps directory.





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