Skip to content

Commit

Permalink
package-level debug logging template
Browse files Browse the repository at this point in the history
  • Loading branch information
LlemonDuck committed May 11, 2022
1 parent 465406b commit 885c785
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Plugin-Development-Logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,23 @@ Information that is only relevant to a developer working on the plugin should be
If you prefer to use an entirely different logging configuration,
you can create your own logback-test.xml within your project's src/test/resources folder.
This file __must__ be a test resource, so that it is not included in your plugin distribution.
As an example, the following logback-test.xml file would log only to console, with the DEBUG level:
As an example, the following logback-test.xml file would log only to console, with the INFO level,
excluding any specified packages that would log at DEBUG level:
```xml
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">

<!-- configure debug level packages here -->
<logger name="my.plugin.package.here" level="DEBUG" />

<root level="DEBUG">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
```

More information on configuring logback-classic can be found in [the logback-classic docs](http://logback.qos.ch/manual/configuration.html).
More information on configuring logback-classic can be found in [the logback-classic docs](https://logback.qos.ch/manual/configuration.html).

0 comments on commit 885c785

Please sign in to comment.