tags:

views:

1442

answers:

6

I would like to centralize different log4j logs to a server. where can I find one ?

A: 

Log4j can be directed to any output stream including a Socket connected to another computer. You still need to write a small application that receives the log4j data and writes it to a log file.

A: 

yes, using socketappender to log to the remote host, but I can't believe there is not already an efficient receiver I could use instead of write it.

thanx

A: 

My two cents ...

Are you looking for a gui application (e.g. for debugging)?

Are you looking for a centralized archive (e.g. for production system administration)?

  • You could use the jdbc appender and store all you log on a db.

Are you looking for library (e.g. for some integration purpose)?

LLP, Andrea

andcoz
@andcoz, do you know where a binary distribution of the Receivers companion might be found?
kpozin
+1  A: 

Just my two cents,

1) I would advise against the JDBC appender for production environments as it can lead to some performance problems when buffers start filling up.

2) I think a better approach would be to use an application that can monitor log files remotely over ssh etc. There are some about, sorry cant remember their names.

Remember log4j is highly performant but it is synchronous so if you do decided to publish log events to a server take into account latency / transient network problems etc.

Karl

Karl
+1  A: 

I would suggest using the SyslogAppender and grabbing an open source implementation of a syslog daemon if running on Windows. Unix/Linux/etc comes with native support for Syslog.

jm04469
I like this idea, and it's what we use. However, there's a problem with the `SyslogAppender` which is that it uses the UDP protocol, so has a maximum message size. The syslog spec appears to define this size as 1k. Have you seen problems with this?
davidsheldon
+1  A: 

Try logFaces, it's a log server, aggregator and viewer built on top of Apache logging services.

Dima