Skip to content

Commit 2c58580

Browse files
committed
fix: silence @clickhouse/client internal stderr logger to prevent TUI corruption
The @clickhouse/client package enables ERROR-level logging by default and writes `[ERROR][@clickhouse/client][Connection]` lines directly to stderr on auth/query failures. These raw writes corrupt the terminal TUI rendering. Set `log: { level: 127 }` (ClickHouseLogLevel.OFF) when creating the client — consistent with how Snowflake (`logLevel: 'OFF'`) and Databricks (no-op logger) already suppress their SDK loggers for the same reason.
1 parent 6c60be1 commit 2c58580

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/drivers/src/clickhouse.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ export async function connect(config: ConnectionConfig): Promise<Connector> {
5757
clientConfig.clickhouse_settings = config.clickhouse_settings
5858
}
5959

60+
// Silence the client's internal stderr logger — its ERROR-level output
61+
// writes raw lines directly to stderr and corrupts terminal TUI rendering.
62+
clientConfig.log = { level: 127 } // ClickHouseLogLevel.OFF = 127
6063
client = createClient(clientConfig)
6164
},
6265

0 commit comments

Comments
 (0)