Semantic Logging (Java Version)

A Library to add semantic logging to your JVM project using SLF4J.

Лицензия

Лицензия

Категории

Категории

Ant Компиляция и сборка
Группа

Группа

de.roamingthings
Идентификатор

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

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

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

0.9.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

Semantic Logging (Java Version)
A Library to add semantic logging to your JVM project using SLF4J.
Ссылка на сайт

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

https://github.com/roamingthings/semanticlogger
Система контроля версий

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

https://github.com/roamingthings/semanticlogger

Скачать semanticlogger

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.29

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

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

Semantic Logger

Build Status Java: Maven Central (Java) Kotlin: Maven Central (Kotlin)

This little library is inspired by the talk Observability in einer Microservice Welt held on Berlin Expert Days 2018 by Andreas Weigel and Jakob Fels.

If you prefer to have some semantic to your logging and improve code readability you can use the SemanticLogger and its SemanticLoggerFactory which adds a thin layer around Slf4j.

The SemanticLoggerFactory can be used like the Slf4j LoggerFactory to create a new Logger by class, name or a delegateLogger:

SemanticLogger logger = SemanticLogger. getLogger(SomeClass.class);

SemanticLogger logger = SemanticLogger. getLogger("SomeLoggerName");

Logger delegateLogger = org.slf4j.LoggerFactory.getLogger(SomeClass.class);
SemanticLogger logger = SemanticLogger. getLogger(delegateLogger);

The SemanticLogger itself provides the following methods for logging:

SemanticLogger log = SemanticLoggerFactory.getLogger(MyClass.class);
log.forTestPurpose(...);                // will log a debug event
log.asExpectedByDefault(...);           // will log an info event
log.toInvestigateTomorrow(...);         // will log a warn event
log.wakeMeUpInTheMiddleOfTheNight(...); // will log an error event

Publishing

Export the secret keys to a keyring:

gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg
 ./gradlew --console=plain -PrepositoryUser=<user> -PrepositoryPassword="<password>" -PsigningKeyId=0x12345678 -PsigningPassword="<key_password>" -PsigningSecretKeyRingFile="/path/to/secring.gpg"

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

Версия
0.9.3
0.9.1