tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Bateman <>
Subject RE: multiple tomcat instance and log4j
Date Wed, 13 Oct 2004 15:40:16 GMT

I use a mix of *nix and Windows here.  I've found that using copy with
the (+) option does a pretty nice job of concatenating log files. *nix
has tools for that natively.

As for sorting, Windows has a 'sort' module that can sort pretty good
sized input files.  You have to pass the unsorted file as redirected
input and capture the output the same way - I've built several batch
files that do this for various clients.

Of course, once you have a "merged" and sorted log file, any log
processor should analyze it.

Hope this helps.


On Tue, 2004-10-12 at 14:20, Simon Zeng wrote:
> Thanks for the quick response. Seperate logs for each tomcat was my proposal
> too. But people like to have an easy way to view them as a whole. A nice
> merge tool would be nice. The first and minumum requirement for the tool is
> to merge and sort all log records by time so that it can really be viewed as
> if there is only one log file. grep/sort command in unix might help, but we
> are in Windows. Chainsaw and Lumbermill provides nice GUI and filtering but
> i don't see merge function in them. Any suggestions?
> Thanks a lot,
> -Simon
> -----Original Message-----
> From: Shapira, Yoav []
> Sent: Tuesday, October 12, 2004 1:51 PM
> To: Tomcat Users List
> Subject: RE: multiple tomcat instance and log4j
> Hi,
> >It is my impression that lots of people on this user list are using
> log4j
> >as
> >their logging mechanism. Also i believe lots of people here use
> multiple
> >tomcat instances for load balancing. I am wondering how you guys are
> using
> >log4j in this case. If anyone can give me some ideas and/or answer my
> >questions below, that will be greatly appreciated.
> I'm one of those people, and my usage is as simple as can be: everything
> separate.  Each webapp has its own and log4j.jar in
> WEB-INF/lib.  Each Tomcat server has its own logging configuration.
> They all write to separate log files.
> I use programmatic configuration with a repository selector originally
> written by Jacob Kjome and available in the log4j CVS repository.  I (or
> rather our admins) also use the configuration servlet in from the log4j
> CVS to change log4j settings at runtime, and they sometimes attach
> chainsaw to running systems to look at what's going on.  All of this has
> been working for years now without a problem, using log4j 1.2.8 and
> various versions of tomcat.
> Since I don't combine the logs or run any sort of statistics from them,
> I can't help with those questions you had.  
> My take on it is to always keep everything separate.  It's easier to
> manage, deploy, and inspect only the relevant logs when an error occurs.
> Disk space is virtually free not only for big companies anymore, but for
> nearly anyone, so the cost of having N copies of the log4j.jar is
> negligible.
> Yoav Shapira
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential, proprietary
> and/or privileged.  This e-mail is intended only for the individual(s) to
> whom it is addressed, and may not be saved, copied, printed, disclosed or
> used by anyone else.  If you are not the(an) intended recipient, please
> immediately delete this e-mail from your computer system and notify the
> sender.  Thank you.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message