Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

socket appenders - basic example step by step [closed]

Could you recommend simple tutorial about using log4j in distributed system, especially about SocketAppender?

I tried to find some basic examples, but I failed.

like image 761
alicjasalamon Avatar asked Aug 01 '12 09:08

alicjasalamon


1 Answers

This one looks simple and straightforward. From the article:

Example server startup with SimpleSocketServer (from the command line):

> java -jar log4j.jar org.apache.log4j.net.SimpleSocketServer 4712 log4j-server.properties

Now all you have to do is specify your appender on the client.

Example appender:

> log4j.appender.SERVER=org.apache.log4j.net.SocketAppender
> log4j.appender.SERVER.Port=4712
> log4j.appender.SERVER.RemoteHost=loghost
> log4j.appender.SERVER.ReconnectionDelay=10000
like image 64
Brian Agnew Avatar answered Sep 28 '22 05:09

Brian Agnew