Skip to content

Commit

Permalink
elf4j-engine version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
q3769 committed Mar 26, 2023
1 parent 87ef20f commit 3027f01
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ JSON Customized
### global no-op flag, overriding and will turn off all logging if set true
#noop=true
### Minimum output level is optional, default to TRACE if omitted
### This override the default global minimum output level
level=info
### These override the output level of all caller classes included the specified packages
level@org.springframework=warn
Expand Down
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<groupId>io.github.elf4j</groupId>
<artifactId>elf4j-provider</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<packaging>jar</packaging>
<name>elf4j-provider</name>
<description>Native logging service provider implementation of ELF4J (Easy Logging Facade For Java)
Expand Down Expand Up @@ -68,7 +68,7 @@
<dependency>
<groupId>io.github.elf4j</groupId>
<artifactId>elf4j-engine</artifactId>
<version>2.0.0</version>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand All @@ -94,6 +94,12 @@
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-lambda</artifactId>
<version>1.2.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
7 changes: 6 additions & 1 deletion src/test/java/elf4j/provider/IntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,21 @@

import elf4j.Logger;
import elf4j.engine.NativeLogger;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

class IntegrationTest {
@AfterEach
void afterEach() throws InterruptedException {
Thread.sleep(500);
}
@Nested
class defaultLogger {
@Test
void hey() {
void hey() throws InterruptedException {
Logger logger = Logger.instance();

logger.atInfo().log("Hello, world!");
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/elf4j/provider/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public class Main {
static Logger logger = Logger.instance();

public static void main(String[] args) {
public static void main(String[] args) throws InterruptedException {
logger.atInfo().log("Hello, world!");
Exception issue = new Exception("Test ex message");
logger.atWarn().log(issue, "Testing issue '{}' in {}", issue, Main.class);
Expand Down Expand Up @@ -49,6 +49,7 @@ public static void main(String[] args) {
"optional",
(Supplier) () -> "as usual");

Thread.sleep(200);
LogServiceManager.shutdown();
}
}
8 changes: 7 additions & 1 deletion src/test/java/elf4j/provider/SampleUsageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
package elf4j.provider;

import elf4j.Logger;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;

Expand All @@ -34,6 +35,11 @@
class SampleUsageTest {
static Logger logger = Logger.instance();

@AfterEach
void afterEach() throws InterruptedException {
Thread.sleep(500);
}

@Nested
class plainText {
@Test
Expand Down Expand Up @@ -78,7 +84,7 @@ void lazyAndEagerArgumentsCanBeMixed() {
class throwable {
@Test
void asTheFirstArgument() {
Exception exception = new Exception("Exception message");
Exception exception = new Exception("Exception message", new Exception("Causal ex message"));
logger.atError().log(exception);
logger.atError().log(exception, "Optional log message");
logger.atInfo()
Expand Down

0 comments on commit 3027f01

Please sign in to comment.