Java Driver for LogreIO
Java driver to send logs to Logre.IO
Are you a GoLang developer? Check out the Go driver for Logre.IO
<dependency>
<groupId>com.github.rawnly</groupId>
<artifactId>logre-client-java</artifactId>
<version>{latest}</version>
</dependency>
class HelloWorld {
// Initialize the class
private static final LogreClient log = new LogreClient("<boxId>", "<auth-token>", MyClass.class);
public static void main(String[] args) {
// Start Logging!
log.info("Hello World!");
System.out.println("Hello World!");
}
}
LogreClient(String boxId, String authToken, Class<?> aClass)
LogreClient(String boxId, Class<?> aClass)
LogreClient uses Unirest under the hood, so you can easily setup a proxy via the setProxy
method.
private final LogreClient log = new LogreClient(...)
// Later somewhere in your code
log.setProxy(String host, int port)
// or
log.setProxy(String host, int port, String username, String password)