Compare commits

...

2 commits

2 changed files with 38 additions and 0 deletions

View file

@ -42,6 +42,33 @@ docker compose up -d
The bot can now be invited with the following URL: `https://discord.com/oauth2/authorize?client_id=<application-id>&scope=applications.commands%20bot&permissions=513`
## Logging
Logging can be configured via a [Logback configuration](https://logback.qos.ch/).
The [default logger configuration](bot/src/main/resources/logback.xml) can be overwritten with the `LOGBACK_CONFIGURATION_FILE`
variable with the path to the file.
One can add following example configuration to configure the logger for the `de.hhhammer.dchat.discord.ws` package to log
the `DEBUG` level:
```text
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
</encoder>
</appender>
<logger name="de.hhhammer.dchat.discord.ws" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
```
For more information regarding the logger configuration refer to the [manual](https://logback.qos.ch/manual/index.html).
## LICENSE
The software is licensed under the [MPL-2.0](LICENSE) license.

View file

@ -0,0 +1,11 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>
</configuration>