generated from Huluvu424242/rades-example.template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#60feature/#60-restlib] sonar issues fixed
Signed-off-by: huluvu424242 <huluvu424242@gmail.com>
- Loading branch information
1 parent
73f8f69
commit 00b6ae8
Showing
2 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/com/github/funthomas424242/jenkinsmonitor/logstash/LogStashConfigManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.github.funthomas424242.jenkinsmonitor.logstash; | ||
|
||
/*- | ||
* #%L | ||
* Jenkins Monitor | ||
* %% | ||
* Copyright (C) 2019 - 2023 PIUG | ||
* %% | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Lesser Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Lesser Public | ||
* License along with this program. If not, see | ||
* <http://www.gnu.org/licenses/lgpl-3.0.html>. | ||
* #L% | ||
*/ | ||
|
||
import ch.qos.logback.classic.LoggerContext; | ||
import ch.qos.logback.classic.util.ContextInitializer; | ||
import ch.qos.logback.core.joran.spi.JoranException; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class LogStashConfigManager { | ||
|
||
public static void reloadDefaultLoggerConfiguration() throws JoranException { | ||
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory(); | ||
ContextInitializer ci = new ContextInitializer(loggerContext); | ||
loggerContext.reset(); | ||
ci.autoConfig(); | ||
} | ||
} |