diff --git a/.gitignore b/.gitignore
index b2a0646..d86d6b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
target/
.idea/
bin/
+.idea
diff --git a/Jenkinsfile b/Jenkinsfile
index 99d53c5..ea2d75d 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -183,4 +183,4 @@ def SetVersion( v ) {
}
}
-return this
\ No newline at end of file
+return this
diff --git a/pom.xml b/pom.xml
index ecea400..795a5e6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
Logger library for applications
- https://gitea.locusworks.net/locusworks/app-logger.git
+ ssh://gitea@gitea.locusworks.net:7999/locusworks/app-logger.git
locusworks
@@ -20,8 +20,8 @@
${project.basedir}
1.8
1.8
- 2.17.2
- 1.7.36
+ 2.19.0
+ 2.0.1
https://nexus.locusworks.net
@@ -30,7 +30,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.0.0-M5
+ 3.0.0-M7
always
@@ -38,7 +38,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.10.0
+ 3.10.1
${maven.compiler.source}
${maven.compiler.target}
@@ -51,7 +51,7 @@
org.owasp
dependency-check-maven
- 7.0.0
+ 7.2.0
@@ -63,7 +63,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 3.0.0
+ 3.1.0
enforce
@@ -153,4 +153,4 @@
-
\ No newline at end of file
+
diff --git a/src/main/java/net/locusworks/logger/ApplicationLogger.java b/src/main/java/net/locusworks/logger/ApplicationLogger.java
index 5761eb7..a6f2b52 100644
--- a/src/main/java/net/locusworks/logger/ApplicationLogger.java
+++ b/src/main/java/net/locusworks/logger/ApplicationLogger.java
@@ -17,7 +17,7 @@ public class ApplicationLogger implements org.slf4j.Logger {
private static final Logger logger = LoggerFactory.getLogger(ApplicationLogger.class);
- private String name;
+ private final String name;
private LogLevel level;
@@ -471,7 +471,7 @@ public class ApplicationLogger implements org.slf4j.Logger {
public void error(Map values, String valueFormat, StringBuilder sb, Throwable e) {
msgHelper(LogLevel.ERROR, values, valueFormat, sb);
if (e != null) {
- msgHelper(LogLevel.ERROR, "", e);
+ msgHelper(LogLevel.ERROR,"", e);
}
}
@@ -588,7 +588,7 @@ public class ApplicationLogger implements org.slf4j.Logger {
values.entrySet()
.stream()
.map(entry -> String.format(format, entry.getKey(), entry.getValue()))
- .forEach(s -> builder.append(s));
+ .forEach(builder::append);
log(level, builder.toString());
}
@@ -605,9 +605,9 @@ public class ApplicationLogger implements org.slf4j.Logger {
/**
* helper method to format a message for logging
- * @param level log level to use
+ * @param level level to use
* @param message message to log
- * @param e any throwable to log
+ * @param e any throwable to log
*/
private void msgHelper(LogLevel level, String message, Throwable e) {
String msg = e == null ? String.format("%n%s", message) : String.format("%n%s%n%s%n%s", message, e.getMessage(), getStackTrace(e));
@@ -622,4 +622,4 @@ public class ApplicationLogger implements org.slf4j.Logger {
private String format(String message, LogLevel level) {
return String.format("th%06d [%-5s] [%s] %s", Thread.currentThread().getId(), level, this.name, message);
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/net/locusworks/logger/ApplicationLoggerFactory.java b/src/main/java/net/locusworks/logger/ApplicationLoggerFactory.java
index 46b8929..d43d811 100644
--- a/src/main/java/net/locusworks/logger/ApplicationLoggerFactory.java
+++ b/src/main/java/net/locusworks/logger/ApplicationLoggerFactory.java
@@ -20,7 +20,7 @@ public class ApplicationLoggerFactory {
* Need to get the log level from the properties file.
* Would normally use the configuration service but would create a circular dependency as
* the configuration service use the ApplicationLoggerFactory to create a logger
- * @param initializer The initializer
+ * @param init The initializer
*/
public static void init(ApplicationLoggerInitializer init) {
initializer = init;
@@ -214,4 +214,4 @@ public class ApplicationLoggerFactory {
this.level = level;
}
}
-}
\ No newline at end of file
+}