-
- To set up the target in the configuration file,
- use the following syntax:
-
-
-
- This assumes just one target and a single rule. More configuration
- options are described here.
-
-
- To set up the log target programmatically use code like this:
-
-
-
- To print the results, use any application that's able to receive messages over
- TCP or UDP. NetCat is
- a simple but very powerful command-line tool that can be used for that. This image
- demonstrates the NetCat tool receiving log messages from Network target.
-
-
-
- NOTE: If your receiver application is ever likely to be off-line, don't use TCP protocol
- or you'll get TCP timeouts and your application will be very slow.
- Either switch to UDP transport or use AsyncWrapper target
- so that your application threads will not be blocked by the timing-out connection attempts.
-
-
- There are two specialized versions of the Network target: Chainsaw
- and NLogViewer which write to instances of Chainsaw log4j viewer
- or NLogViewer application respectively.
-
-
-