Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eveld/fluentd-log4j
https://github.com/eveld/fluentd-log4j
Last synced: 9 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/eveld/fluentd-log4j
- Owner: eveld
- Created: 2016-01-11T14:41:30.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-11T14:42:27.000Z (almost 9 years ago)
- Last Synced: 2023-03-13T10:55:30.348Z (over 1 year ago)
- Language: Java
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fluentd4log4j
[![Join the chat at https://gitter.im/tuxetuxe/fluentd4log4j](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tuxetuxe/fluentd4log4j?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
_A Log4J appender to push log events to a fluentd server._## How to Use
### Maven dependency
```com.twimba
fluentd4log4j
1.0```
### Configuration
| property | default value | Description |
| ------------- |------------------| -------------|
| mdcKeys | "" | The MDC keys (comma separated) that should be added to the log structure. |
| tagPrefix | ""| The fluentd tag prefix to be used |
| tag | "log" | The fluentd tag to be used in all the log messages sent there |
| host | "localhost" | The fluentd server host to where to send the log messages. |
| port | 24224 | The fluentd server port to where to send the log messages. |
| timeout | 15000 (15s) | The timeout (in milliseconds) to connect to the fluentd server|
| bufferCapacity | 1048576 (1Mb) | The socket buffer capacity to connect to the fluentd server |
| useConstantDelayReconnector| false | Switch from the default Exponential Delay reconnector to a constant delay reconnector |### Example
**log4j.properties**
```
log4j.rootLogger=info, fluentd
log4j.appender.fluentd=com.twimba.fluentd4log4j.FluentdAppender.java
log4j.appender.fluentd.mdcKeys=user,host,whatever
log4j.appender.fluentd.host=fluentdhost
```
**fluentd configuration**
```type forward
port 24224type stdout
```
## License
This is available in the Apache Licence 2.0
http://www.tldrlegal.com/license/apache-license-2.0-(apache-2.0)