-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
88 additions
and
77 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
@@ -1,50 +1,46 @@ | ||
<!-- turn debug=true on for logback-test.xml to help debug logging configurations. --> | ||
<configuration debug="false"> | ||
<configuration debug="false"> | ||
|
||
<!-- | ||
We prefer logging to console instead of a File. Its very easy | ||
to pipe console output to a file and most organizations already | ||
have a log rotation setup in place. It can also be faster to use this | ||
approach vs using a FileAppender directly | ||
--> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<!-- encoders are by default assigned the type | ||
ch.qos.logback.classic.encoder.PatternLayoutEncoder --> | ||
<encoder> | ||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
<!-- We prefer logging to console instead of a File. Its very easy to pipe | ||
console output to a file and most organizations already have a log rotation | ||
setup in place. It can also be faster to use this approach vs using a FileAppender | ||
directly --> | ||
<appender name="STDOUT" | ||
class="ch.qos.logback.core.ConsoleAppender"> | ||
<!-- encoders are by default assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder --> | ||
<encoder> | ||
<!-- <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} | ||
- %msg%n</pattern> --> | ||
<pattern>%-5level %logger{36} - %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<!-- | ||
Async appenders can drastically speed up logging as well as your application's | ||
response time but with some potential drawbacks. Read more at. | ||
https://logback.qos.ch/manual/appenders.html#AsyncAppender | ||
http://blog.takipi.com/how-to-instantly-improve-your-java-logging-with-7-logback-tweaks/ | ||
Always be sure to test different configurations for yourself. Every | ||
application has different requirements. | ||
--> | ||
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender"> | ||
<appender-ref ref="STDOUT" /> | ||
<queueSize>1000</queueSize> | ||
</appender> | ||
<!-- Async appenders can drastically speed up logging as well as your application's | ||
response time but with some potential drawbacks. Read more at. https://logback.qos.ch/manual/appenders.html#AsyncAppender | ||
http://blog.takipi.com/how-to-instantly-improve-your-java-logging-with-7-logback-tweaks/ | ||
Always be sure to test different configurations for yourself. Every application | ||
has different requirements. --> | ||
<appender name="ASYNC" | ||
class="ch.qos.logback.classic.AsyncAppender"> | ||
<appender-ref ref="STDOUT" /> | ||
<queueSize>1000</queueSize> | ||
</appender> | ||
|
||
<!-- | ||
We prefer a default setting of WARN and turn on logging explicitly for | ||
any packages we care about. INFO is also a good choice. Going lower than INFO | ||
may log sensitive data such as passwords or api tokens via HTTP or networking | ||
libraries. Remember these defaults impact third party libraries as well. | ||
Often times the cost of logging is overlooked. Try a simple benchmark of | ||
logging in a tight loop a few million iterations vs not logging and see the difference. | ||
There are a few ways you can change logging levels on the fly in a running app. | ||
This could be a better solution than over logging. | ||
--> | ||
<root level="ERROR"> | ||
<!-- | ||
If you want async logging just use ref="ASYNC" instead. | ||
We will favor synchronous logging for simplicity. --> | ||
<appender-ref ref="STDOUT" /> | ||
</root> | ||
<logger name="io.github.mzattera.semanticweb.kraal.RdfImporter" | ||
level="DEBUG" /> | ||
|
||
<!-- We prefer a default setting of WARN and turn on logging explicitly | ||
for any packages we care about. INFO is also a good choice. Going lower than | ||
INFO may log sensitive data such as passwords or api tokens via HTTP or networking | ||
libraries. Remember these defaults impact third party libraries as well. | ||
Often times the cost of logging is overlooked. Try a simple benchmark of | ||
logging in a tight loop a few million iterations vs not logging and see the | ||
difference. There are a few ways you can change logging levels on the fly | ||
in a running app. This could be a better solution than over logging. --> | ||
<root level="ERROR"> | ||
<!-- If you want async logging just use ref="ASYNC" instead. We will favor | ||
synchronous logging for simplicity. --> | ||
<appender-ref ref="STDOUT" /> | ||
</root> | ||
|
||
</configuration> |