I use keycloak on kubernetes. I need to use a cli script that will display keycloak logs in json format. So I mounted my script in / opt / jboss / startup-scripts
Here is my script:
embed-server --server-config=standalone-ha.xml
/subsystem=logging/json-formatter=SUMO_FORMATTER:add(pretty-print=false,
exception-output-type=detailed-and-formatted, print-details=false)
/subsystem=logging/console-handler=CONSOLE/:write-attribute(name=enabled,value=false)
/subsystem=logging/console-handler=SUMO_CONSOLE:add(enabled=true,
named-formatter=SUMO_FORMATTER)
/subsystem=logging/root-logger=ROOT/:write-attribute(name=handlers,value=["SUMO_CONSOLE"])
stop-embedded-server
On kubernetes in keycloak for logs I receive information:
Executing cliscript: /opt/jboss/startup-scripts/logging.cli
Can't reset to rootin the middle of the path @140
How can I solve this problem? When I run the keycloak image with docker-compose and with a script mounted, everything works fine. Unfortunately, there is a mistake in kubernetes. I will be very grateful for all the answers.
Update: using providers for logging in in json format is not an option in my architecture.