KEYCLOAK-12490 Add missing details for jboss-logging event listener

This commit is contained in:
stianst 2019-12-17 06:25:17 +01:00 committed by Stian Thorgersen
parent a14ba80938
commit d4cba7a6e5

View file

@ -79,8 +79,46 @@ This logging is very useful if you want to use a tool like Fail2Ban to detect if
is trying to guess user passwords. You can parse the log file for `LOGIN_ERROR` and pull out the IP Address. Then feed this information
into Fail2Ban so that it can help prevent attacks.
The Logging Event Listener logs events to the `org.keycloak.events` logger category. By default debug log events are not
included in server logs.
To include debug log events in server logs, edit the `standalone.xml` file and change the log level used by the Logging
Event listener. Alternately, you can configure the log level for `org.keycloak.events`.
For example, to change the log level add the following:
[source,xml]
----
<subsystem xmlns="urn:jboss:domain:logging:...">
...
<logger category="org.keycloak.events">
<level name="DEBUG"/>
</logger>
</subsystem>
----
To change the log level used by the Logging Event listener, add the following:
[source,xml]
----
<subsystem xmlns="urn:jboss:domain:keycloak-server:...">
...
<spi name="eventsListener">
<provider name="jboss-logging" enabled="true">
<properties>
<property name="success-level" value="info"/>
<property name="error-level" value="error"/>
</properties>
</provider>
</spi>
</subsystem>
----
Valid values for the log levels are `debug`, `info`, `warn`, `error`, and `fatal`.
The Email Event Listener sends an email to the user's account when an event occurs.
The Email Event Listener only supports the following events at the moment:
Currently, the Email Event Listener supports the following events:
* Login Error
* Update Password