Skip to content

Commit

Permalink
When log level is set to trace, format() was called before context wa…
Browse files Browse the repository at this point in the history
…s initiallized. Fixed

Fixes #319
  • Loading branch information
skhotoveli authored and robbavey committed May 25, 2018
1 parent 263de80 commit 4ced446
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/logstash/beats/BeatsHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public BeatsHandler(IMessageListener listener) {

@Override
public void channelActive(final ChannelHandlerContext ctx) throws Exception {
context = ctx;
if (logger.isTraceEnabled()){
logger.trace(format("Channel Active"));
}
super.channelActive(ctx);
context = ctx;
messageListener.onNewConnection(ctx);
}

Expand Down

0 comments on commit 4ced446

Please sign in to comment.