Skip to content

rawnly/logre-client-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Installation

<dependency>
    <groupId>com.github.rawnly</groupId>
    <artifactId>logre-client-java</artifactId>
    <version>{latest}</version>
</dependency>

Quick Start

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!");
	}
}

Available Constructors

  • LogreClient(String boxId, String authToken, Class<?> aClass)
  • LogreClient(String boxId, Class<?> aClass)

Proxy requests

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)