Problem
CliFormatter reads LOG_UTC from the process environment
(lib/python/base_cli/logging.py:193):
self.use_utc = use_utc if use_utc is not None else os.environ.get("LOG_UTC") == "1"
LOG_UTC is a generic, unnamespaced name. Every other base-cli-specific environment variable is
prefixed, and the only unprefixed names the package reads otherwise are recognized cross-tool
standards (NO_COLOR, XDG_CACHE_HOME, XDG_CONFIG_HOME, LOCALAPPDATA, APPDATA, SHELL,
COMSPEC):
$ grep -rhoE "BASE_CLI_[A-Z_]+" lib/python/base_cli/ | sort -u
BASE_CLI_CACHE_DIR BASE_CLI_COLOR BASE_CLI_CONFIG_DIR BASE_CLI_DISPLAY_COMMAND
LOG_UTC is not a standard. Any unrelated tool, CI image, or shell profile that exports LOG_UTC=1
silently changes the timestamp format of every base-cli CLI on that machine, and the log timestamps
are part of the retained diagnostic bundle. It is also undocumented: it appears in no file under
docs/.
Verified evidence
Reviewed 2026-09-30 at a58ec109349fa3f3d03eae5b0de078b39ea361a2.
os.environ["LOG_UTC"] = "1"
CliFormatter().use_utc -> True
$ grep -rn "LOG_UTC" docs/
(no matches)
Proposal
- Read
BASE_CLI_LOG_UTC as the supported name.
- Continue honouring
LOG_UTC for one release with a BaseCliDeprecationWarning (the project
already has deprecations.deprecated() and a documented policy in docs/api-stability.md), then
remove it.
- Document both the variable and the full environment surface. There is currently no single page
listing the environment variables base-cli reads; adding one to docs/integrations.md would also
serve the other env-var work.
Acceptance criteria
BASE_CLI_LOG_UTC controls UTC timestamps.
LOG_UTC still works but warns, with the removal release named.
- One documentation page lists every environment variable base-cli reads, its meaning, and its
default.
Non-goals
- Do not change the default timestamp format or the
datefmt strings.
Problem
CliFormatterreadsLOG_UTCfrom the process environment(
lib/python/base_cli/logging.py:193):LOG_UTCis a generic, unnamespaced name. Every other base-cli-specific environment variable isprefixed, and the only unprefixed names the package reads otherwise are recognized cross-tool
standards (
NO_COLOR,XDG_CACHE_HOME,XDG_CONFIG_HOME,LOCALAPPDATA,APPDATA,SHELL,COMSPEC):LOG_UTCis not a standard. Any unrelated tool, CI image, or shell profile that exportsLOG_UTC=1silently changes the timestamp format of every base-cli CLI on that machine, and the log timestamps
are part of the retained diagnostic bundle. It is also undocumented: it appears in no file under
docs/.Verified evidence
Reviewed 2026-09-30 at
a58ec109349fa3f3d03eae5b0de078b39ea361a2.Proposal
BASE_CLI_LOG_UTCas the supported name.LOG_UTCfor one release with aBaseCliDeprecationWarning(the projectalready has
deprecations.deprecated()and a documented policy indocs/api-stability.md), thenremove it.
listing the environment variables base-cli reads; adding one to
docs/integrations.mdwould alsoserve the other env-var work.
Acceptance criteria
BASE_CLI_LOG_UTCcontrols UTC timestamps.LOG_UTCstill works but warns, with the removal release named.default.
Non-goals
datefmtstrings.