# Packages
No description provided by the author
# README
serialize_log4j_golang
This project to receive log4jEvent from Log4j1.x socketAppender, then convert it as json and forward it, to handle logs generated by legacy Java apps.
Usage
string `env:"HOST_LOG4J_INPUT" envDefault:"localhost"`
string `env:"PORT_LOG4J_INPUT" envDefault:"2518"`
string `env:"JSON_LOG_HOST" envDefault:"localhost"`
string `env:"JSON_LOG_PORT" envDefault:"5540"`
The service read ENV vars on startup, and then create tcp listener on PORT_LOG4J_INPUT. The output tcp socket should be defined on startup, if not reachable will retry for a few times until panicking.
Impl
Split the stream
The problem with my current hacky approach to split the stream is, it can sometimes successfully parsed by sop, while sometimes not.
TODO:
- close connection on forwarding finished? shouldn't
- retry client connection on failure in the middle of operation?
- LEVEL not working, ref: https://github.com/qos-ch/reload4j/blob/master/src/main/java/org/apache/log4j/Priority.java
- log4cxx not supported