GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(structured-logging): an unrecognized ID_LOG_FORMAT silently resolves to text — no fallback warning, unlike ID_LOG_TZ · Issue #5434 · developing-today/code

id(structured-logging): an unrecognized ID_LOG_FORMAT silently resolves to text — no fallback warning, unlike ID_LOG_TZ #5434

New issue
Copy link
New issue
Copy link
Closed
#5440
Closed
id(structured-logging): an unrecognized ID_LOG_FORMAT silently resolves to text — no fallback warning, unlike ID_LOG_TZ#5434
#5440
Copy link
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 4, 2026
Issue body actions

Problem

An unrecognized ID_LOG_FORMAT value silently resolves to text logging, with no warning anywhere — unlike the neighbouring ID_LOG_TZ knob, whose unrecognized values fall back to UTC and warn, by design.

Evidence (verified this run, main 0ab687345)

  • pkgs/id/src/structured_logging.rs — LogFormat::parse: "anything unrecognized is Text". Probe on the laptop (~/git/fleet/probe-logformat, the function extracted verbatim) printed:

    ID_LOG_FORMAT=Some("josn") -> Text
    ID_LOG_FORMAT=Some("jsonl") -> Text
    ID_LOG_FORMAT=Some("structured") -> Text
    ID_LOG_FORMAT=Some("yaml") -> Text
    

    (controls: None/""/"text" → Text, "json"/" JSON " → Json.)

  • LogConfig (same file) carries a tz_fell_back: bool for the timezone knob but no equivalent flag for the format — the information that the value was unrecognized is discarded inside parse.

  • pkgs/id/src/main.rs init_logging (line ~99) warns on stderr for config.tz_fell_back ("warning: ID_LOG_TZ value not recognized; log timestamps use UTC") and for a log file that cannot be opened, but has nothing to warn about for format, because the flag does not exist.

  • The module header documents the tz behaviour as the designed pattern: "an unrecognized value falls back to UTC and the caller warns about the fallback."

Why it matters

An operator who sets ID_LOG_FORMAT=josn (or jsonl, or any near-miss) while wiring logs into a JSON ingester gets plain-text logs and no signal at any point — the exact silent-misconfiguration failure the tz fallback warning exists to prevent. The two knobs sit side by side in the same config struct and the same doc block; only one of them warns.

Acceptance criteria

  • LogConfig records whether a set, non-empty ID_LOG_FORMAT value was unrecognized (unset/empty/text/json, case-insensitive after trim, never set the flag — mirroring how unset/empty tz never sets tz_fell_back).
  • init_logging in pkgs/id/src/main.rs prints a stderr warning naming ID_LOG_FORMAT when the flag is set, in the same style as the existing ID_LOG_TZ warning, before tracing starts.
  • The resolved format itself is unchanged: unrecognized values still resolve to Text (no behaviour break for anyone relying on the lenient parse).
  • Tests in structured_logging.rs pin the table: recognized values and unset/empty leave the flag clear; josn/yaml set it while still resolving to Text.

Activity

  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    status/in-progressQueue worker lifecycle state
    source/creatorFiled by the new-issue-creator job
    on Nov 4, 2026
  2. developing-today commented on Nov 4, 2026

    @developing-today
    developing-todayBot
    on Nov 4, 2026 – with developing.today
    Contributor
    More actions

    CODE-1319

  3. dezren39
    added
    priority/lowNice to have; do when convenient
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    work/self-assignedAn agent grabbed this item directly, outside the queue
    on Nov 4, 2026
  4. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    🤖 Agent note · state: filed

    • Agent: new-issue-creator job (new-issue-creator-code-a)
    • Session / ID: new-issue-creator-code-a run, 2026-11-04 06:05 CST
    • Found via: filed this run
    • Task: Filed after verifying on the laptop (probe ~/git/fleet/probe-logformat, LogFormat::parse extracted verbatim from main 0ab687345): every unrecognized non-empty ID_LOG_FORMAT resolves to Text, LogConfig carries tz_fell_back but no format equivalent, and init_logging warns only for the tz fallback. Guarded self-solve this run (protocol §4): the fix is trivial and clearly scoped — a format_fell_back flag on LogConfig, the mirroring stderr warning in init_logging, and pinning tests. No queue packet is enqueued for this issue; it is held via work/self-assigned.
    • Expectation: effort xs; done = PR merged with the flag + warning + tests, targeted structured_logging tests green on the laptop.
    • Links: body evidence in the issue; branch creator-a/5434-logformat-fallback-warning (PR to follow)
  5. developing-today
    added
    status:in-review
    on Nov 4, 2026
  6. dezren39
    added a commit that references this issue on Nov 4, 2026

    fix(id): warn on unrecognized ID_LOG_FORMAT instead of silently using…

    54a21ea
  7. dezren39
    closed this as completedin #5440on Nov 4, 2026
  8. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 4, 2026
  9. dezren39 commented on Nov 4, 2026

    @dezren39
    dezren39
    on Nov 4, 2026
    MemberAuthor
    More actions

    🤖 Agent note · state: done

    • Agent: new-issue-creator job (new-issue-creator-code-a)
    • Session / ID: new-issue-creator-code-a run, 2026-11-04 06:05 CST
    • Found via: filed this run; guarded self-solve (protocol §4)
    • Task: Fixed — PR fix(id): warn on unrecognized ID_LOG_FORMAT instead of silently using text (#5434) #5440 squash-merged (54a21ea): LogConfig now records format_fell_back for a set, non-empty, unrecognized ID_LOG_FORMAT, and init_logging warns on stderr in the same style as the ID_LOG_TZ warning. The lenient parse is unchanged (unrecognized values still resolve to Text).
    • Expectation: done — cargo test -p id --lib structured_logging 13 passed on the laptop (incl. the new pinning test), cargo check -p id --bins clean; work labels stripped with this note.
    • Links: PR fix(id): warn on unrecognized ID_LOG_FORMAT instead of silently using text (#5434) #5440 · merge 54a21ea
  10. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    work/self-assignedAn agent grabbed this item directly, outside the queue
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.