We deployed keycloak server 4.6.0.Final for authentication for our web application How can i configure to get server logs? I cannot find any logs from server.log or Audit.log files. Do I need to configure any place to show the keycloak server log details.
Specify log level
There are two environment variables available to control the log level for Keycloak:
KEYCLOAK_LOGLEVEL
: Specify log level for Keycloak (optional, default is INFO)ROOT_LOGLEVEL
: Specify log level for underlying container (optional, default is INFO)Supported log levels are ALL
, DEBUG
, ERROR
, FATAL
, INFO
, OFF
, TRACE
and WARN
.
Log level can also be changed at runtime, for example (assuming docker exec access):
./keycloak/bin/jboss-cli.sh --connect --command='/subsystem=logging/console-handler=CONSOLE:change-log-level(level=DEBUG)'
./keycloak/bin/jboss-cli.sh --connect --command='/subsystem=logging/root-logger=ROOT:change-root-log-level(level=DEBUG)'
./keycloak/bin/jboss-cli.sh --connect --command='/subsystem=logging/logger=org.keycloak:write-attribute(name=level,value=DEBUG)'
The content is taken from jboss/keycloak - Docker Hub.
When starting the Keycloak instance you can pass an environment variables to set log level for Keycloak.
docker run -e KEYCLOAK_LOGLEVEL=DEBUG jboss/keycloak
For the Kubernetes Deployment:
Add the following env variable to Kuberenetes deployment manifest.
keycloak:
extraEnv: |
- name: KEYCLOAK_LOGLEVEL
value: DEBUG
- name: WILDFLY_LOGLEVEL
value: DEBUG
More informations : https://github.com/devsu/docker-keycloak/blob/master/server/README.md
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With