镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[docs] What client-v2 and jdbc-v2 log, and a safe logging configuration - #3301

Open
LjungeldTheHelper wants to merge 1 commit into
ClickHouse:mainfrom
LjungeldTheHelper:docs/3295-v2-safe-logging
Open

LjungeldTheHelper wants to merge 1 commit into
ClickHouse:mainfrom
LjungeldTheHelper:docs/3295-v2-safe-logging

Conversation

@LjungeldTheHelper

@LjungeldTheHelper LjungeldTheHelper commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Documentation for #3295. It describes the logging behavior introduced by #3300, so merge it after #3300. The
branch is based on main and contains only the documentation commit.

  • docs/clickhouse-docs/index.mdx, Logging:
    • "What the client and the driver log": what is never logged (SQL, values, bodies, credentials, tokens, header
      values, full URLs and query strings, configuration values, client name and metadata, query IDs, exception
      messages), the use of ERROR/WARN/DEBUG, and metrics, spans, or a packet capture with test credentials for
      deeper diagnosis.
    • "Safe logging configuration": copy-ready logback.xml and log4j2.xml that keep com.clickhouse and the
      Apache HttpClient header and wire loggers at INFO, with the two V2 packages to switch to DEBUG for a short
      diagnosis and OFF as the alternative. The configuration covers the unshaded names and both shaded prefixes.
    • Corrects the shaded prefix: com.clickhouse.shaded. is client-v2 with the all classifier;
      clickhouse-jdbc-all relocates to com.clickhouse.client.internal. and also contains the unshaded names
      (checked in the published clickhouse-jdbc-all 0.11.0 jar).
  • docs/clickhouse-docs/jdbc.mdx, Troubleshooting → Logging: links to the two sections.

No code changes.

Checklist

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only updates to clickhouse-docs; no application code, configuration defaults, or security behavior changes in this PR.

Overview
This PR documents only (no runtime changes) how client-v2 and jdbc-v2 handle logging and how to configure SLF4J safely in production.

On the Java integrations overview (index.mdx), it expands the Logging section with a new “What the client and the driver log” page that states what is never emitted (including at TRACE): SQL/parameters/rows/bodies, credentials and headers, URLs/query strings, config, client metadata/query IDs, and exception messages; it also explains ERROR / WARN / DEBUG usage and points to metrics/spans or test packet capture for deeper debugging.

It adds “Safe logging configuration” with copy-ready logback.xml and log4j2.xml that pin com.clickhouse and Apache HttpClient header/wire loggers to INFO (with notes on short-lived DEBUG for com.clickhouse.client.api / com.clickhouse.jdbc and using OFF). The HTTP wire logs blurb is corrected for shaded logger prefixes: com.clickhouse.shaded.* for client-v2 all vs com.clickhouse.client.internal.* for clickhouse-jdbc-all, listing all relevant logger names.

The JDBC troubleshooting Logging subsection gains a cross-link to those two anchors so driver users see the same privacy guarantees and sample configs.

Reviewed by Cursor Bugbot for commit e658d62. Bugbot is set up for automated code reviews on this repo. Configure here.

…ion (ClickHouse#3295)

Adds copy-ready Logback and Log4j 2 configurations that keep the client,
the driver and the Apache HttpClient header and wire loggers (unshaded,
client-v2 `all` and clickhouse-jdbc-all names) at INFO, and documents the
logging contract of client-v2 and jdbc-v2. Corrects the shaded logger
prefix of clickhouse-jdbc-all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Nov 5, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants