25 Commits

Author SHA1 Message Date
dfbfcb5882 Merge pull request 'master' (#16) from master into release/1.1
Reviewed-on: #16
2022-09-18 22:51:52 -05:00
90cf786ef1 Merge branch 'release/1.1' into master 2022-09-18 22:51:46 -05:00
1a86215b6d Merge pull request 'develop' (#15) from develop into master
Reviewed-on: #15
2022-09-18 22:50:58 -05:00
32fc117caf Merge branch 'master' into develop 2022-09-18 22:50:52 -05:00
94dcaf508d updated libraries 2022-09-18 22:39:41 -05:00
ed3b02f439 Updated libraries 2022-09-18 22:35:08 -05:00
8b4e67892a Fixed issue with Jenkis file 2022-09-18 22:31:42 -05:00
16b1df3dd6 Fixed issue with error 2022-09-18 22:26:46 -05:00
0c4e4efea8 Updated libraries to fix vulnerabilities 2022-09-18 22:25:14 -05:00
df50805038 Updated libraries to fix vulnerabilities 2022-09-18 22:23:00 -05:00
65cc93f466 Merge pull request 'master' (#13) from master into release/1.1
All checks were successful
Locusworks Team/app-logger/pipeline/head This commit looks good
Reviewed-on: #13
2022-03-02 17:32:06 -06:00
a4c39918f0 Merge branch 'develop' into master
All checks were successful
Locusworks Team/app-logger/pipeline/head This commit looks good
2022-03-02 17:30:25 -06:00
55a2f620a1 Merge pull request 'Adjusted node' (#11) from bug/jenkins_update into develop
All checks were successful
Locusworks Team/app-logger/pipeline/head This commit looks good
Reviewed-on: #11
2022-03-02 17:24:09 -06:00
b50eccc471 Adjusted node 2022-03-02 18:16:32 -05:00
ecfdf202d8 Merge pull request 'bug/jenkins_update' (#10) from bug/jenkins_update into develop
Some checks reported errors
Locusworks Team/app-logger/pipeline/head Something is wrong with the build of this commit
Reviewed-on: #10
2022-03-02 17:15:36 -06:00
43cffb3610 Merge branch 'develop' of ssh://gitea.locusworks.net:7999/locusworks/app-logger into bug/jenkins_update 2022-03-02 18:08:10 -05:00
8575afe735 Updated jenkins build file 2022-03-02 18:07:55 -05:00
f5806348dc Merge pull request 'feature/update_library_again (#8)' (#9) from develop into master
Some checks reported errors
Locusworks Team/app-logger/pipeline/head Something is wrong with the build of this commit
Reviewed-on: #9
2022-03-02 16:57:19 -06:00
043e9e9075 feature/update_library_again (#8)
Some checks reported errors
Locusworks Team/app-logger/pipeline/head Something is wrong with the build of this commit
Co-authored-by: Isaac Parenteau <locus2k@gmail.com>
Reviewed-on: #8
2022-03-02 16:56:32 -06:00
1986831f2c updated log4j library 2022-03-02 17:47:08 -05:00
9ac40b5922 Updated log4j 2022-03-02 17:41:44 -05:00
77bd18b0f1 Merge pull request 'develop' (#7) from develop into master
All checks were successful
Locusworks Team/app-logger/pipeline/head This commit looks good
Reviewed-on: #7
2021-09-14 22:24:35 -05:00
e30e2c8455 Merge pull request 'release/1.0' (#4) from release/1.0 into master
All checks were successful
Locusworks Team/app-logger/pipeline/head This commit looks good
2020-05-31 21:32:23 +00:00
bf1b6497ef Merge pull request 'develop' (#3) from develop into release/1.0
All checks were successful
Locusworks Team/app-logger/pipeline/head This commit looks good
2020-05-31 21:32:06 +00:00
7c65b8aecf Merge pull request 'develop' (#1) from develop into master
All checks were successful
Locusworks Team/app-logger/pipeline/head This commit looks good
2020-05-22 18:56:39 +00:00
5 changed files with 23 additions and 21 deletions

2
.gitignore vendored
View File

@ -2,4 +2,6 @@
.classpath
.settings/
target/
.idea/
bin/
.idea

10
Jenkinsfile vendored
View File

@ -48,7 +48,7 @@ def init() {
if (branch_name.indexOf('master')==0) build_type='master'
// common pipeline elements
node('master') {
node() {
Initialize()
SetVersion(build_type)
print_vars() // after SetVersion - all variables now defined
@ -57,16 +57,16 @@ def init() {
}
if (branch_name.indexOf('develop')==0) {
node('master') {
node() {
Deploy();
}
} else if (branch_name.indexOf('release/')==0) {
node('master') {
node() {
Deploy();
}
}
node('master') {
node() {
set_result('SUCCESS')
}
@ -183,4 +183,4 @@ def SetVersion( v ) {
}
}
return this
return this

16
pom.xml
View File

@ -9,7 +9,7 @@
<description>Logger library for applications</description>
<scm>
<url>ssh://git@bitbucket.org:locus2k/applogger.git</url>
<url>ssh://gitea@gitea.locusworks.net:7999/locusworks/app-logger.git</url>
</scm>
<organization>
<name>locusworks</name>
@ -20,8 +20,8 @@
<main.basedir>${project.basedir}</main.basedir>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<log4j.version>2.14.1</log4j.version>
<slf4j.version>1.7.32</slf4j.version>
<log4j.version>2.19.0</log4j.version>
<slf4j.version>2.0.1</slf4j.version>
<nexus.repo>https://nexus.locusworks.net</nexus.repo>
</properties>
@ -30,7 +30,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.0.0-M7</version>
<configuration>
<forkMode>always</forkMode>
</configuration>
@ -38,7 +38,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
@ -51,7 +51,7 @@
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>6.3.1</version>
<version>7.2.0</version>
<executions>
<execution>
<goals>
@ -63,7 +63,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
<executions>
<execution>
<id>enforce</id>
@ -153,4 +153,4 @@
</pluginRepository>
</pluginRepositories>
</project>
</project>

View File

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

View File

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