com.dinstone.loghub:loghub-slf4j

log hub delegate some log framework

License

License

Categories

Categories

SLF4J Application Layer Libs Logging
GroupId

GroupId

com.dinstone.loghub
ArtifactId

ArtifactId

loghub-slf4j
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

log hub delegate some log framework
Project Organization

Project Organization

dinstone

Download loghub-slf4j

How to add to project

<!-- https://jarcasting.com/artifacts/com.dinstone.loghub/loghub-slf4j/ -->
<dependency>
    <groupId>com.dinstone.loghub</groupId>
    <artifactId>loghub-slf4j</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.dinstone.loghub/loghub-slf4j/
implementation 'com.dinstone.loghub:loghub-slf4j:1.3.0'
// https://jarcasting.com/artifacts/com.dinstone.loghub/loghub-slf4j/
implementation ("com.dinstone.loghub:loghub-slf4j:1.3.0")
'com.dinstone.loghub:loghub-slf4j:jar:1.3.0'
<dependency org="com.dinstone.loghub" name="loghub-slf4j" rev="1.3.0">
  <artifact name="loghub-slf4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.dinstone.loghub', module='loghub-slf4j', version='1.3.0')
)
libraryDependencies += "com.dinstone.loghub" % "loghub-slf4j" % "1.3.0"
[com.dinstone.loghub/loghub-slf4j "1.3.0"]

Dependencies

compile (2)

Group / Artifact Type Version
com.dinstone.loghub : loghub-core jar 1.3.0
org.slf4j : slf4j-api jar 1.7.12

test (4)

Group / Artifact Type Version
org.apache.logging.log4j : log4j-slf4j-impl jar 2.5
org.apache.logging.log4j : log4j-api jar 2.5
org.apache.logging.log4j : log4j-core jar 2.5
junit : junit jar 4.13.1

Project Modules

There are no modules declared in this project.

What

Loghub is a log delegate.

Quick Start

select log implement:

		<dependency>
			<groupId>com.dinstone.loghub</groupId>
			<artifactId>loghub-core</artifactId>
			<version>1.2.1</version>
		</dependency>

or

		<dependency>
			<groupId>com.dinstone.loghub</groupId>
			<artifactId>loghub-slf4j</artifactId>
			<version>1.2.1</version>
		</dependency>

Example

##JUL##

	@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##

	@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);
	}

Versions

Version
1.3.0
1.2.1
1.2.0
1.1.1
1.1.0
1.0.0