You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Umesh Awasthi <um...@gmail.com> on 2011/02/05 08:35:59 UTC

Best Place to place log files

Hi All,

I am working on a webapplication and it is going to use looging in good way
for its import export process.so we need to store log files at some place so
that when ever some needs to consult logfiles can do that.

One thing we can do is to create afolder in the webapps and place alll such
related files in this location but this approach seems to have one major
issue the moment we deploy a new war all previosu logs will be deleted and
we are lost.

my question is in such case what is the best place to store your application
related log files?

-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

Re: Best Place to place log files

Posted by Tim Watts <ti...@cliftonfarm.org>.
I would say that where you place the logs is not as important as how
that location gets configured for the webapp. Two things to AVOID are 1)
requiring the app to be reconfigured whenever a new war is deployed and
2) hard coding the location of the logs and/or the log4j configuration.

You can usually get around these by setting system properties or setting
variables in the JNDI environment provided by the web container. System
properties are not as desirable since they're exposed to ALL webapps in
the container.


On Sat, 2011-02-05 at 13:05 +0530, Umesh Awasthi wrote:
> Hi All,
> 
> I am working on a webapplication and it is going to use looging in good way
> for its import export process.so we need to store log files at some place so
> that when ever some needs to consult logfiles can do that.
> 
> One thing we can do is to create afolder in the webapps and place alll such
> related files in this location but this approach seems to have one major
> issue the moment we deploy a new war all previosu logs will be deleted and
> we are lost.
> 
> my question is in such case what is the best place to store your application
> related log files?
> 



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


Re: Best Place to place log files

Posted by Umesh Awasthi <um...@gmail.com>.
Thats seems good and i guess for virtual hosting/dedicated hosting that will
not create a big issue for rights and permissions ,atleast i hope so

On Sat, Feb 5, 2011 at 2:05 PM, Christian Grobmeier <gr...@gmail.com>wrote:

> Hi
>
> i think everybody does it in a different way, but the $tomcat/webapps
> dir is probably not the best for the mentioned reasons. You could put
> it in $tomcat/logs/yourwebapp or even in /var/log/webapp
>
> Later case needs more rights.
>
> Cheers
> Christian
>
> On Sat, Feb 5, 2011 at 8:35 AM, Umesh Awasthi <um...@gmail.com>
> wrote:
> > Hi All,
> >
> > I am working on a webapplication and it is going to use looging in good
> way
> > for its import export process.so we need to store log files at some place
> so
> > that when ever some needs to consult logfiles can do that.
> >
> > One thing we can do is to create afolder in the webapps and place alll
> such
> > related files in this location but this approach seems to have one major
> > issue the moment we deploy a new war all previosu logs will be deleted
> and
> > we are lost.
> >
> > my question is in such case what is the best place to store your
> application
> > related log files?
> >
> > --
> > With Regards
> > Umesh Awasthi
> > http://www.travellingrants.com/
> >
>
>
>
> --
> http://www.grobmeier.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

Re: Best Place to place log files

Posted by Christian Grobmeier <gr...@gmail.com>.
Hi

i think everybody does it in a different way, but the $tomcat/webapps
dir is probably not the best for the mentioned reasons. You could put
it in $tomcat/logs/yourwebapp or even in /var/log/webapp

Later case needs more rights.

Cheers
Christian

On Sat, Feb 5, 2011 at 8:35 AM, Umesh Awasthi <um...@gmail.com> wrote:
> Hi All,
>
> I am working on a webapplication and it is going to use looging in good way
> for its import export process.so we need to store log files at some place so
> that when ever some needs to consult logfiles can do that.
>
> One thing we can do is to create afolder in the webapps and place alll such
> related files in this location but this approach seems to have one major
> issue the moment we deploy a new war all previosu logs will be deleted and
> we are lost.
>
> my question is in such case what is the best place to store your application
> related log files?
>
> --
> With Regards
> Umesh Awasthi
> http://www.travellingrants.com/
>



-- 
http://www.grobmeier.de

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


Re: Best Place to place log files

Posted by Thorbjørn Ravn Andersen <no...@gmail.com>.
Den 05/02/11 08.35, Umesh Awasthi skrev:
> my question is in such case what is the best place to store your application
> related log files?
For running inside GlassFish I found that the simplest way was to 
channel the log events to java.util.logging which GlassFish both handles 
and provide a web interface for.  From log4j you can either write an 
appender mapping to java.util.logging, or use slf4j modules to channel 
log4j->slf4j->java.util.logging.

-- 
   Thorbjørn Ravn Andersen  "...plus... Tubular Bells!"


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