Sourced from @clickhouse/client's
releases.
1.18.1
Improvements
- Setting
log.leveldefault value toClickHouseLogLevel.WARNinstead ofClickHouseLogLevel.OFFto provide better visibility into potential issues without overwhelming users with too much information by default.const client = createClient({ // ... log: { level: ClickHouseLogLevel.WARN, // default is now ClickHouseLogLevel.WARN instead of ClickHouseLogLevel.OFF }, })
- Logging is now lazy, which means that the log messages will only be constructed if the log level is appropriate for the message. This can improve performance in cases where constructing the log message is expensive, and the log level is set to ignore such messages. See
ClickHouseLogLevelenum for the complete list of log levels. (#520)const client = createClient({ // ... log: { level: ClickHouseLogLevel.TRACE, // to log everything available down to the network level events }, })
- Enhanced the logging of the HTTP request / socket lifecycle with additional trace messages and context such as Connection ID (UUID) and Request ID and Socket ID that embed the connection ID for ease of tracing the logs of a particular request across the connection lifecycle. To enable such logs, set the
log.levelconfig option toClickHouseLogLevel.TRACE. (#567)[2026-02-25T09:19:13.511Z][TRACE][@clickhouse/client][Connection] Insert: received 'close' event, 'free' listener removed Arguments: { operation: 'Insert', connection_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c', query_id: '9dfda627-39a2-41a6-9fc9-8f8716574826', request_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c:3', socket_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c:2', event: 'close' } [2026-02-25T09:19:13.502Z][TRACE][@clickhouse/client][Connection] Query: reusing socket Arguments: { operation: 'Query', connection_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c', query_id: 'ad0127e8-b1c7-4ed6-9681-c0162f7a0ea9', request_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c:4', socket_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c:2', usage_count: 1 }
- A step towards structured logging: the client now passes rich context to the logger
argsparameter (e.g.connection_id,query_id,request_id,socket_id). (#576)
... (truncated)
Sourced from @clickhouse/client's
changelog.
1.18.1
Improvements
- Setting
log.leveldefault value toClickHouseLogLevel.WARNinstead ofClickHouseLogLevel.OFFto provide better visibility into potential issues without overwhelming users with too much information by default.const client = createClient({ // ... log: { level: ClickHouseLogLevel.WARN, // default is now ClickHouseLogLevel.WARN instead of ClickHouseLogLevel.OFF }, })
- Logging is now lazy, which means that the log messages will only be constructed if the log level is appropriate for the message. This can improve performance in cases where constructing the log message is expensive, and the log level is set to ignore such messages. See
ClickHouseLogLevelenum for the complete list of log levels. (#520)const client = createClient({ // ... log: { level: ClickHouseLogLevel.TRACE, // to log everything available down to the network level events }, })
- Enhanced the logging of the HTTP request / socket lifecycle with additional trace messages and context such as Connection ID (UUID) and Request ID and Socket ID that embed the connection ID for ease of tracing the logs of a particular request across the connection lifecycle. To enable such logs, set the
log.levelconfig option toClickHouseLogLevel.TRACE. (#567)[2026-02-25T09:19:13.511Z][TRACE][@clickhouse/client][Connection] Insert: received 'close' event, 'free' listener removed Arguments: { operation: 'Insert', connection_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c', query_id: '9dfda627-39a2-41a6-9fc9-8f8716574826', request_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c:3', socket_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c:2', event: 'close' } [2026-02-25T09:19:13.502Z][TRACE][@clickhouse/client][Connection] Query: reusing socket Arguments: { operation: 'Query', connection_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c', query_id: 'ad0127e8-b1c7-4ed6-9681-c0162f7a0ea9', request_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c:4', socket_id: 'da3c9796-5dc5-46ef-83b0-ed1f4422094c:2', usage_count: 1 }
- A step towards structured logging: the client now passes rich context to the logger
argsparameter (e.g.connection_id,query_id,request_id,socket_id). (#576)
... (truncated)
cbdd7bf
Release 1.18.1 (#590)c9f61eb
Beta 1.18.0 (#588)d0f67b7
Split public and internal drainStream and cover with tests
(#578)535e9b7
Remove unsafeLogUnredactedQueries for now (#580)44e73c7
Default log level to WARN (#581)5146fbc
Focus AI on security and API stability (#579)b7b1d8d
Trivial E2E test against beta (#577)761e29e
Structured logs, part 1 (#576)fd23dd7
Provide more context in logs for connection and request handling (#567)a7866e7
Adjusting CI DevX (#574)This version was pushed to npm by 4b819b88c84b, a new
releaser for @clickhouse/client since your current
version.