com.dinstone.loghub:loghub-core

log hub delegate some log framework

License

License

GroupId

GroupId

com.dinstone.loghub
ArtifactId

ArtifactId

loghub-core
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-core

How to add to project

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

Dependencies

test (1)

Group / Artifact Type Version
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