Skip to content

Commit

Permalink
elf4j version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
q3769 committed Apr 13, 2024
1 parent 0e26f47 commit 0580417
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ application would use runtime-scope for this provider as a dependency:
```

Note: Only one logging provider such as this should be in effect at run-time. If multiple providers end up in the final
build of an application, somehow, then the `elf4j.logger.factory.fqcn` system property will have to be used to select
build of an application, somehow, then the `elf4j.service.provider.fqcn` system property will have to be used to select
the desired provider.

```
Expand Down
6 changes: 3 additions & 3 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-jul</artifactId>
<version>6.0.0</version>
<version>6.1.0</version>

<packaging>jar</packaging>
<name>elf4j-jul</name>
Expand Down Expand Up @@ -68,7 +68,7 @@
<dependency>
<groupId>io.github.elf4j</groupId>
<artifactId>elf4j</artifactId>
<version>4.0.0</version>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down Expand Up @@ -146,7 +146,7 @@
<configuration>
<java>
<palantirJavaFormat>
<version>2.40.0</version> <!-- optional -->
<version>2.43.0</version>
<style>PALANTIR</style> <!-- or AOSP/GOOGLE (optional) -->
<formatJavadoc>true
</formatJavadoc> <!-- defaults to false (optional, requires at least Palantir 2.39.0) -->
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/elf4j/jul/JulLogger.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ private static JulLogger getLogger(String name) {
return getLogger(name, DEFAULT_LEVEL);
}

private static EnumMap<Level, Map<String, JulLogger>> initLoggerCache() {
private static @NonNull EnumMap<Level, Map<String, JulLogger>> initLoggerCache() {
EnumMap<Level, Map<String, JulLogger>> loggerCache = new EnumMap<>(Level.class);
EnumSet.allOf(Level.class).forEach(level -> loggerCache.put(level, new ConcurrentHashMap<>()));
return loggerCache;
}

private static String replaceWithJulPlaceholders(String message) {
private static @NonNull String replaceWithJulPlaceholders(@NonNull String message) {
StringBuilder stringBuilder = new StringBuilder();
char[] chars = message.toCharArray();
int placeholderIndex = 0;
Expand All @@ -92,7 +92,7 @@ private static String replaceWithJulPlaceholders(String message) {
return stringBuilder.toString();
}

private static EnumMap<Level, java.util.logging.Level> setLevelMap() {
private static @NonNull EnumMap<Level, java.util.logging.Level> setLevelMap() {
EnumMap<Level, java.util.logging.Level> levelMap = new EnumMap<>(Level.class);
levelMap.put(TRACE, java.util.logging.Level.FINEST);
levelMap.put(DEBUG, java.util.logging.Level.FINE);
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/elf4j/jul/JulLoggerFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@
import elf4j.Logger;
import elf4j.spi.LogServiceProvider;

/** */
/** Provides an elf4j Logger instance implemented via Java 4 util Logger */
public class JulLoggerFactory implements LogServiceProvider {
/** A default constructor is required by the JDK Service Provider framework */
public JulLoggerFactory() {}

@Override
public Logger logger() {
return JulLogger.instance();
Expand Down

0 comments on commit 0580417

Please sign in to comment.