-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix Access Logs not working #214
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -13,13 +13,16 @@ | |||||||||||||
import com.raynigon.ecs.logging.access.AccessLogProperties; | ||||||||||||||
import com.raynigon.ecs.logging.access.context.IAccessLogContext; | ||||||||||||||
import com.raynigon.ecs.logging.access.event.EcsAccessEvent; | ||||||||||||||
import lombok.extern.slf4j.Slf4j; | ||||||||||||||
|
||||||||||||||
import java.net.URL; | ||||||||||||||
import java.util.*; | ||||||||||||||
import java.util.concurrent.ExecutorService; | ||||||||||||||
import java.util.concurrent.ScheduledExecutorService; | ||||||||||||||
import java.util.concurrent.ScheduledFuture; | ||||||||||||||
import java.util.logging.Logger; | ||||||||||||||
Check notice on line 23 in ecs-logging-access/src/main/java/com/raynigon/ecs/logging/access/logback/AccessLogContext.java Codacy Production / Codacy Static Code Analysisecs-logging-access/src/main/java/com/raynigon/ecs/logging/access/logback/AccessLogContext.java#L23
|
||||||||||||||
|
||||||||||||||
@Slf4j | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. UnnecessarilyFullyQualified: This fully qualified name is unambiguous to the compiler if imported.
Suggested change
ℹ️ Expand to see all @sonatype-lift commandsYou can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Note: When talking to LiftBot, you need to refresh the page to see its response. |
||||||||||||||
public class AccessLogContext implements IAccessLogContext, LifeCycle, Context, AppenderAttachable<IAccessEvent> { | ||||||||||||||
|
||||||||||||||
private final AccessLogProperties config; | ||||||||||||||
|
@@ -31,6 +34,7 @@ | |||||||||||||
private final Map<String, Object> objects; | ||||||||||||||
private final URL configLocation; | ||||||||||||||
private final AppenderAttachableImpl<IAccessEvent> appenderContainer; | ||||||||||||||
private final List<ConfigurationEventListener> eventListeners = new ArrayList<>(); | ||||||||||||||
private SequenceNumberGenerator sequenceNumberGenerator; | ||||||||||||||
|
||||||||||||||
private ExecutorService executorService; | ||||||||||||||
|
@@ -71,14 +75,14 @@ | |||||||||||||
} | ||||||||||||||
|
||||||||||||||
public void start() { | ||||||||||||||
executorService = ExecutorServiceUtil.newExecutorService(); | ||||||||||||||
executorService = ExecutorServiceUtil.newThreadPoolExecutor(); | ||||||||||||||
|
||||||||||||||
try { | ||||||||||||||
JoranConfigurator jc = new JoranConfigurator(); | ||||||||||||||
jc.setContext(this); | ||||||||||||||
jc.doConfigure(this.configLocation); | ||||||||||||||
} catch (Throwable e) { | ||||||||||||||
//TODO handle exception | ||||||||||||||
log.error("Unable to start access log", e); | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
StatusPrinter.printInCaseOfErrorsOrWarnings(this); | ||||||||||||||
|
@@ -163,6 +167,16 @@ | |||||||||||||
this.sequenceNumberGenerator = sequenceNumberGenerator; | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
@Override | ||||||||||||||
public void addConfigurationEventListener(ConfigurationEventListener listener) { | ||||||||||||||
eventListeners.add(listener); | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
@Override | ||||||||||||||
public void fireConfigurationEvent(ConfigurationEvent configurationEvent) { | ||||||||||||||
eventListeners.forEach((listener) -> listener.listen(configurationEvent)); | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
public ScheduledExecutorService getScheduledExecutorService() { | ||||||||||||||
throw new UnsupportedOperationException(); | ||||||||||||||
} | ||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
version=2.0.1-SNAPSHOT | ||
version=2.1.0-SNAPSHOT | ||
org.gradle.caching=true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UnnecessarilyFullyQualified: This fully qualified name is unambiguous to the compiler if imported.
ℹ️ Expand to see all @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
@sonatype-lift ignore
@sonatype-lift ignoreall
@sonatype-lift exclude <file|issue|path|tool>
file|issue|path|tool
from Lift findings by updating your config.toml fileNote: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.