-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from dubasdey/7-invalid-json-being-generated-mi…
…ssing-contextmap Invalid JSON being generated, missing contextMap
- Loading branch information
Showing
5 changed files
with
60 additions
and
7 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
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
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
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
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,20 @@ | ||
package org.erc.log4j2.layout; | ||
|
||
import java.util.logging.ConsoleHandler; | ||
import java.util.logging.Level; | ||
import java.util.logging.Logger; | ||
import java.util.logging.SimpleFormatter; | ||
|
||
public class LoggerConfig { | ||
public LoggerConfig(){ | ||
System.setProperty("java.util.logging.SimpleFormatter.format","%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS.%1$tL %4$-7s [%3$s] (%2$s) %5$s %6$s%n"); | ||
|
||
final ConsoleHandler consoleHandler = new ConsoleHandler(); | ||
consoleHandler.setLevel(Level.FINEST); | ||
consoleHandler.setFormatter(new SimpleFormatter()); | ||
|
||
final Logger app = Logger.getLogger("test"); | ||
app.setLevel(Level.FINEST); | ||
app.addHandler(consoleHandler); | ||
} | ||
} |