Skip to content
No description, website, or topics provided.
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tinylog2-gelf-example
tinylog2-gelf
.gitignore
.travis.yml
LICENSE
README.md
pom.xml

README.md

tinylog2-gelf

Initial clone from joschi/tinylog2-gelf

tinylog2-gelf is a Writer implementation for tinylog2 writing log messages to a GELF compatible server like Graylog2 or logstash.

Configuration

The following configuration settings are supported by tinylog2-gelf:

  • server (default: localhost)
    • The hostname of the GELF-compatible server.
  • port (default: 12201)
    • The port of the GELF-compatible server.
  • transport (default: UDP)
    • The transport protocol to use, valid settings are UDP and TCP.
  • hostname (default: local hostname or localhost as fallback)
    • The hostname of the application.
  • additionalLogEntryValues (default: DATE, LEVEL, RENDERED_LOG_ENTRY)
  • staticFields (default: empty)
    • Additional static fields for the GELF messages.

Additional configuration settings are supported by the GelfWriter class. Please consult the Javadoc for details.

Examples

tinylog2-gelf can be configured using a configuration-file.

Properties file example:

writer=gelf
writer.server=graylog2.example.com
writer.port=12201
writer.transport=TCP
writer.hostname=myhostname
writer.additionalLogEntryValues=EXCEPTION,FILE,LINE
writer.staticFields=additionalfield1:foo,additionalfield2:bar

Maven Artifacts

This project is available on Maven Central. To add it to your project simply add the following dependencies to your pom.xml:

<dependency>
  <groupId>com.github.chaudhryfaisal</groupId>
  <artifactId>tinylog2-gelf</artifactId>
  <version>0.1.0</version>
</dependency>

Support

Please file bug reports and feature requests in GitHub issues.

License

Copyright (c) 2014 Jochen Schalanda

This library is licensed under the Apache License, Version 2.0.

See http://www.apache.org/licenses/LICENSE-2.0.html or the LICENSE file in this repository for the full license text.

You can’t perform that action at this time.