> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-gateway/5/gateway-log-variables/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # Log variables > Learn more about configurable log variables, including gateway cluster ID and application mode. ## GATEWAY\_LOG\_CONSOLE\_JSON Determines whether console logs display in the default format or JSON format. When set to `false`, logs display in the default format: ``` 2024-02-14T09:18:28-06:00 INF grpc server is starting up ``` When set to `true`, logs display in JSON format: ``` {"level":"info","time":"2024-02-14T09:18:28-06:00","message":"grpc server is starting up"} ``` ### Environment Variable `GATEWAY_LOG_CONSOLE_JSON` ### File **Section:** `log` **Key:** `console_json` ### Default `false` --- ## GATEWAY\_LOG\_FILE\_ENABLED Determines whether the gateway writes to a log file. ### Environment Variable `GATEWAY_LOG_FILE_ENABLED` ### File **Section:** `log` **Key:** `file_enabled` ### Default `true` --- ## GATEWAY\_LOG\_FILE\_JSON Determines whether file logs display in the default format or JSON format. When set to `false`, logs display in the default format: ``` 2024-02-14T09:18:28-06:00 INF grpc server is starting up ``` When set to `true`, logs display in JSON format: ``` {"level":"info","time":"2024-02-14T09:18:28-06:00","message":"grpc server is starting up"} ``` ### Environment Variable `GATEWAY_LOG_FILE_JSON` ### File **Section:** `log` **Key:** `file_json` ### Default `false` --- ## GATEWAY\_LOG\_LEVEL Sets the verbosity of the logs that the gateway displays to the console and file logs. ### Environment Variable `GATEWAY_LOG_LEVEL` ### File **Section:** `log` **Key:** `level` ### Default `INFO` ### Log Levels `["TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", "DISABLED"]` --- ## GATEWAY\_LOG\_SERVER\_DIR Sets the directory for the `gateway.log` file when you launch the gateway as a server. When you don't launch the gateway as a server or runner, the system places logs in `GATEWAY_APPLICATION_WORKING_DIR`. ### Environment Variable `GATEWAY_LOG_SERVER_DIR` ### File **Section:** `log` **Key:** `server_dir` ### Default `/var/log/gateway` --- ## GATEWAY\_LOG\_TIMESTAMP\_TIMEZONE Sets the timezone for timestamps in gateway logs. For example: ``` 2024-05-03T10:36:55-05:00 INF using local connection ``` Timezones are shown in UTC by default. When you set this to `local`, the gateway uses your machine's timezone. You can also set a timezone (`tz`) identifier such as `America/New_York`. ### Environment Variable `GATEWAY_LOG_TIMESTAMP_TIMEZONE` ### File **Section:** `log` **Key:** `timestamp_timezone` ### Default `utc` ### Timezone Values `["utc", "local", ...any tz identifier]` > Learn more about configurable log variables, including gateway cluster ID and application mode.