https://github.com/iopipe/iopipe-java-logger-tinylog
Support for TinyLog using the IOpipe Logger Plugin.
https://github.com/iopipe/iopipe-java-logger-tinylog
iopipe java logger logging tinylog
Last synced: about 2 months ago
JSON representation
Support for TinyLog using the IOpipe Logger Plugin.
- Host: GitHub
- URL: https://github.com/iopipe/iopipe-java-logger-tinylog
- Owner: iopipe
- License: apache-2.0
- Created: 2018-09-28T19:17:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-25T20:45:50.000Z (over 6 years ago)
- Last Synced: 2025-02-13T13:16:45.709Z (4 months ago)
- Topics: iopipe, java, logger, logging, tinylog
- Language: Shell
- Size: 220 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IOpipe Logger Adapter for TinyLog (Java)
[ ](https://bintray.com/iopipe/iopipe-logger-tinylog/iopipe-logger-tinylog/_latestVersion)[](https://circleci.com/gh/iopipe/iopipe-java-logger-tinylog)[](https://www.javadoc.io/doc/com.iopipe/iopipe-logger-tinylog)
Support for [TinyLog](https://www.tinylog.org/) using the
[IOpipe](https://www.iopipe.com/) Logger Plugin. This plugin is to be used
with the [IOpipe Java Agent](https://github.com/iopipe/iopipe-java).It is licensed under the Apache 2.0.
# Building With The Adapter
Your `pom.xml` file may be modified to include the following dependency:
```xml
com.iopipe
iopipe-logger-tinylog```
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](https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ServicesResourceTransformer) documentation.# Configuration
The adapter is configured using the same method as the documentation for
[Configuring TinyLog](https://tinylog.org/configuration).## `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:```java
import com.iopipe.logger.tinylog.IOpipeWriter;
import org.pmw.tinylog.Configurator;
```Then in a static initializer or appropriate method you may then use:
```java
Configurator.currentConfig().writer(new IOpipeWriter()).activate();
```