# JSON Logging To File

**URL:** <https://forum.keycloak.org/t/json-logging-to-file/19580>\
**Category:** Configuring the server\
**Created:** [January 12, 2023, 11:51am UTC](https://forum.keycloak.org/t/json-logging-to-file/19580 "2023-01-12T11:51:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomasz](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@tomasz](https://forum.keycloak.org/u/tomasz)\
**Post date:** [January 12, 2023, 11:51am UTC](https://forum.keycloak.org/t/json-logging-to-file/19580/1 "2023-01-12T11:51:09Z")

</div>

I am currently using KC 19.0.3 and I am not able to make Keycloak to log in log file in JSON format. I am starting my docker instance with following env variables… Logs in console are printed in JSON format, in file they are not… any ideas?

```auto
KC_LOG: console,file
KC_LOG_FILE_OUTPUT: json
KC_LOG_CONSOLE_OUTPUT: json
KC_LOG_LEVEL: "INFO,org.keycloak.events:trace"

```
