Or you could just use a simple socketappender from log4j and let all instances write to configured host port
在 2012-9-25,0:29,André Warnier <a...@ice-sa.com> 写道: > John Rellis wrote: >> On Mon, Sep 24, 2012 at 10:57 AM, André Warnier <a...@ice-sa.com> wrote: >>> John Rellis wrote: >>> >>>> On Mon, Sep 24, 2012 at 10:12 AM, Alex Samad - Yieldbroker < >>>> alex.sa...@yieldbroker.com> wrote: >>>> >>>> Been thinking about >>>>> Log4j -> syslog -> syslog server >>>>> >>>>> That way you can look at the server and also at the syslog server ... >>>>> give >>>>> you a real time view. >>>>> >>>>> I keep my per server syslogs for 4-7 days and the on the syslog server >>>>> for >>>>> months .. >>>>> >>>>> A >>>>> >>>>> -----Original Message----- >>>>>> From: John Rellis >>>>>> [mailto:john.d.rellis@gmail.**com<john.d.rel...@gmail.com> >>>>>> ] >>>>>> Sent: Monday, 24 September 2012 6:49 PM >>>>>> To: users >>>>>> Subject: Cluster Logging Options >>>>>> >>>>>> Hi, >>>>>> >>>>>> Curious to how people deal with logging in a horizontally clustered >>>>>> environment?? >>>>>> >>>>>> Right now, I am looking at multiple remote instances of Tomcat with >>>>> separate >>>>> >>>>>> log files on each server. Is this the way most people do it or is it >>>>> possible to >>>>> >>>>>> amalgamate the logs at some point to give a more complete picture of >>>>>> what >>>>>> is going on in the system?? >>>>>> >>>>>> Many thanks, >>>>>> John >>>>>> >>>>>> -- >>>>>> John Rellis >>>>> ------------------------------**------------------------------** >>>>> --------- >>>>> To unsubscribe, e-mail: >>>>> users-unsubscribe@tomcat.**apache.org<users-unsubscr...@tomcat.apache.org> >>>>> For additional commands, e-mail: users-h...@tomcat.apache.org >>>> Thanks Alex. >>>> >>>> Could be a good idea to figure out what is going on the system! >>>> >>>> Have you come up with any solutions of clustering tomcat across many >>>> different servers and putting their logs together?? >>> Isn't that precisely what he's telling you above ? >>> >>> >>> >>> ------------------------------**------------------------------**--------- >>> To unsubscribe, e-mail: >>> users-unsubscribe@tomcat.**apache.org<users-unsubscr...@tomcat.apache.org> >>> For additional commands, e-mail: users-h...@tomcat.apache.org >> André, Alex, >> Apologies, I don't understand how that relates to multiple different >> machines/servers on a network. >> I can see how it is a good idea for running multiple tomcat instances on >> one machine alright. >> Not sure what I am missing. I understand the above as writing all tomcat >> logs on the same machine to the syslog. Am I mistaken?? > > There is just a bit missing in your understanding : syslog is a daemon > running on one host, and writes logfiles on that host. But different > processes, running on the same *or on other hosts* can send their log > messages to that one syslog daemon, via the network and TCP/IP e.g., allowing > this syslog daemon to write messages from these various remote processes to > one or more local logfiles. > This, in an abbreviated way, was what Alex was trying to tell you : configure > your Tomcats to use log4j, and configure log4j to send their log messages to > one syslog running on one "logging host". You can configure log4j and syslog > in such a way as to write one common logfile for all Tomcats, or separate > files for each, or both at the same time. > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org