Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dinstone/loghub

loghub is logging delegate hub
https://github.com/dinstone/loghub

Last synced: about 1 month ago
JSON representation

loghub is logging delegate hub

Awesome Lists containing this project

README

        

# What
**Loghub** is a log delegate.

# Quick Start
select log implement:
```xml

com.dinstone.loghub
loghub-core
1.3.1

```
or
```xml

com.dinstone.loghub
loghub-slf4j
1.3.1

```

# Example
##JUL##

```java
@Test
public void test01() throws InterruptedException {
LoggerFactory.getLogger("");

JulOption option = new JulOption().setPattern("logs/loghub.log").setLimitDays(3);
JulDelegateFactory factory = new JulDelegateFactory(option);
LoggerFactory.initialise(factory);

Logger logger = LoggerFactory.getLogger(LoggerTest.class);
for (int i = 0; i < 5; i++) {
logger.info("case 01 {},{}", i);
}

Thread.sleep(1000);
}
```

##SLF4j/Log4j/Log4j2##
```java
@Test
public void test00() throws InterruptedException {
Logger logger = LoggerFactory.getLogger(LoggerTest.class);
for (int i = 0; i < 5; i++) {
logger.info("case 00 {},{}", i);
}

Thread.sleep(1000);
}
```