tinylog-gelf

Writer implementation for tinylog to support logging with GELF messages

Лицензия

Лицензия

Категории

Категории

tinylog Библиотеки уровня приложения Logging
Группа

Группа

com.github.joschi
Идентификатор

Идентификатор

tinylog-gelf
Последняя версия

Последняя версия

0.3.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

tinylog-gelf
Writer implementation for tinylog to support logging with GELF messages
Ссылка на сайт

Ссылка на сайт

https://github.com/joschi/tinylog-gelf
Система контроля версий

Система контроля версий

https://github.com/joschi/tinylog-gelf

Скачать tinylog-gelf

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.joschi/tinylog-gelf/ -->
<dependency>
    <groupId>com.github.joschi</groupId>
    <artifactId>tinylog-gelf</artifactId>
    <version>0.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.joschi/tinylog-gelf/
implementation 'com.github.joschi:tinylog-gelf:0.3.0'
// https://jarcasting.com/artifacts/com.github.joschi/tinylog-gelf/
implementation ("com.github.joschi:tinylog-gelf:0.3.0")
'com.github.joschi:tinylog-gelf:jar:0.3.0'
<dependency org="com.github.joschi" name="tinylog-gelf" rev="0.3.0">
  <artifact name="tinylog-gelf" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.joschi', module='tinylog-gelf', version='0.3.0')
)
libraryDependencies += "com.github.joschi" % "tinylog-gelf" % "0.3.0"
[com.github.joschi/tinylog-gelf "0.3.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.graylog2 : gelfclient jar 1.3.0

provided (1)

Идентификатор библиотеки Тип Версия
org.tinylog : tinylog jar 1.0

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-core jar 1.10.19
org.slf4j : slf4j-simple jar 1.7.12

Модули Проекта

Данный проект не имеет модулей.

This project has been deprecated.

tinylog-gelf

Build Status

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

Configuration

The following configuration settings are supported by tinylog-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

tinylog-gelf can be configured using a properties file/system properties or via the fluent API.

Properties file example:

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

Fluent API example:

GelfWriter gelfWriter = new GelfWriter("graylog2.example.com", 12201, 
                                       GelfTransports.UDP, "myhostname",
                                       EnumSet.of(LogEntryValue.EXCEPTION),
                                       Collections.<String, Object>emptyMap())
Configurator.defaultConfig()
            .writer(gelfWriter)
            .level(Level.INFO)
            .activate();

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.joschi</groupId>
  <artifactId>tinylog-gelf</artifactId>
  <version>0.2.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.

Версии библиотеки

Версия
0.3.0
0.2.0
0.1.0