Skip to content

docs: fix ENABLE_LOGGING variable name in CONFIGURATION.md - #147

Open
mshddev wants to merge 1 commit into
benborla:mainfrom
mshddev:docs/fix-enable-logging-var-name
Open

mshddev wants to merge 1 commit into
benborla:mainfrom
mshddev:docs/fix-enable-logging-var-name

Conversation

@mshddev

@mshddev mshddev commented Aug 12, 2026

Copy link
Copy Markdown

The Monitoring section of docs/CONFIGURATION.md documents MYSQL_ENABLE_LOGGING, but the code reads ENABLE_LOGGING:

// src/utils/index.ts:5
const ENABLE_LOGGING =
  process.env.ENABLE_LOGGING === "true" || process.env.ENABLE_LOGGING === "1";

Setting the documented name has no effect — logging silently stays off. Both .env.dist and RELEASE.md already use ENABLE_LOGGING, so this docs page was the only place carrying the wrong name.

Changes

  • MYSQL_ENABLE_LOGGINGENABLE_LOGGING, in both the Monitoring table and the Advanced Config Example
  • Removed MYSQL_LOG_LEVEL and MYSQL_METRICS_ENABLED — neither appears anywhere in the source, so they are documented but unimplemented
  • Corrected the description. The flag gates diagnostic logging (startup, pool creation, connection acquire/release, errors), not query logging — the SQL text is never logged, apart from failed queries where the mysql2 error object carries it
  • Noted the accepted values, since ENABLE_LOGGING=yes would silently do nothing

Verification

$ grep -rn "MYSQL_ENABLE_LOGGING" --include="*.ts" --include="*.js" . | grep -v node_modules
(no results)

Same for MYSQL_LOG_LEVEL and MYSQL_METRICS_ENABLED.

Not addressed here

MYSQL_POOL_SIZE, MYSQL_QUERY_TIMEOUT, MYSQL_CACHE_TTL and MYSQL_RATE_LIMIT also appear in the Advanced Config Example but have no source references either. Left alone to keep this diff focused — happy to follow up if you want them cleaned out too. (Pool size in particular is hardcoded to 10 at src/config/index.ts:224.)

🤖 Generated with Claude Code

The Monitoring section documented `MYSQL_ENABLE_LOGGING`, but the code
reads `ENABLE_LOGGING` (src/utils/index.ts:5). Setting the documented
name has no effect, so logging silently stays off.

`MYSQL_LOG_LEVEL` and `MYSQL_METRICS_ENABLED` are not read anywhere in
the source either, so they are removed rather than renamed.

Also corrects the description: the flag gates diagnostic logging
(startup, pool creation, connection acquire/release, errors), not query
logging — the SQL text is never logged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant