Skip to content

iopipe/iopipe-java-logger-tinylog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IOpipe Logger Adapter for TinyLog (Java)

Download CircleCIJavadocs

Support for TinyLog using the IOpipe Logger Plugin. This plugin is to be used with the IOpipe Java Agent.

It is licensed under the Apache 2.0.

Building With The Adapter

Your pom.xml file may be modified to include the following dependency:

<dependency>
  <groupId>com.iopipe</groupId>
  <artifactId>iopipe-logger-tinylog</artifactId>
</dependency>

Note that if you are using multiple TinyLog plugins from multiple repositories you will need to merge the services, this can be done by following the service resource transformer for shading documentation.

Configuration

The adapter is configured using the same method as the documentation for Configuring TinyLog.

tinylog.properties Resource

This resource will exist at the base of the JAR and it should contain the following:

tinylog.writer = iopipe

This is the recommended way to use the logger.

System properties

If you are able to set system properties for the Java virtual machine you may use the following, note that this will likely not work if properties are set at run-time:

-Dtinylog.writer=iopipe

Manual Initialization From Java Code

If you wish to manually initialize the logger from your Java code, you may use the following imports:

import com.iopipe.logger.tinylog.IOpipeWriter;
import org.pmw.tinylog.Configurator;

Then in a static initializer or appropriate method you may then use:

Configurator.currentConfig().writer(new IOpipeWriter()).activate();