Skip to content

--log-level debug is identical to info, so -v changes nothing #95

Description

@korya

Problem

--log-level debug produces output byte-identical to info, and -v therefore changes nothing at all. Combined with the already-known dead warn level, --log-level advertises four levels and has two distinct behaviours.

Reproduction

Passing run — 4 lines each, identical:

$ http-assert --assert-ok http://127.0.0.1:8099/ok 2>&1 | wc -l
4
$ http-assert -v --assert-ok http://127.0.0.1:8099/ok 2>&1 | wc -l
4
$ http-assert --log-level debug --assert-ok http://127.0.0.1:8099/ok 2>&1 | wc -l
4

Failing run — 24 lines each; a byte comparison differs only in the timing digits:

$ diff <(http-assert    --assert-ok .../500 2>&1) \
       <(http-assert -v --assert-ok .../500 2>&1)
3c3
< [-] FAILED 534.666µs
---
> [-] FAILED 504.75µs

-s and --log-level error do behave as documented (0 lines on a pass, 20 on a failure, identical to each other).

Why it matters

-v is the flag a user reaches for when a run fails and they want more detail. It gives them nothing, with no indication that it was a no-op. The help promises "Be verbose; log debug messages".

Suggested fix

Either give debug something to say — the resolved configuration, the redirect policy, connection reuse, timing breakdown — or collapse the advertised levels to the two that exist. TestKnownIssueWarnLevelIsDead has a natural sibling here.

Tested at b9d018f.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions