Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix #2 NPE when used with Log4J2-JPL
  • Loading branch information
Stefan Prelle committed Aug 28, 2024
commit 769a38bb34dc375cecddee044f5b5de4038d81ed
4 changes: 2 additions & 2 deletions src/main/java/robaho/net/httpserver/ServerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class ServerImpl {
this.wrapper = wrapper;

this.logger = System.getLogger("robaho.net.httpserver."+System.identityHashCode(this));
LogManager.getLogManager().getLogger(this.logger.getName()).setFilter(new java.util.logging.Filter(){
java.util.logging.Logger.getLogger(this.logger.getName()).setFilter(new java.util.logging.Filter(){
@Override
public boolean isLoggable(LogRecord record) {
record.setMessage("["+protocol+":"+socket.getLocalPort()+"] "+record.getMessage());
Expand Down Expand Up @@ -182,7 +182,7 @@ public void handle(HttpExchange exchange) throws IOException {

var rc = requestCount.get();

var output =
var output =
(
"Connections: "+connectionCount.get()+"\n" +
"Active Connections: "+allConnections.size()+"\n" +
Expand Down