Skip to content

Print stack traces for -ldebug or -ltrace by default #19986

Open

Description

@huonw

Is your feature request related to a problem? Please describe.

When a user runs into a problem like #19979, it's sensible to increase logging, e.g. passing -ldebug or -ltrace. But this doesn't show all info that's potentially relevant, because (AIUI) full stack traces are only shown via the separate flag --print-stacktrace.

Describe the solution you'd like

Maybe we could make this a bit smoother by implicitly enabling stack trace printing at more verbose log levels (DEBUG or TRACE).

Describe alternatives you've considered

Alternatively, we log stack traces at DEBUG level so they automatically show up for -ldebug, as an orthogonal aspect to --print-stacktrace.

Additional context

N/A

Activity

  1. kaos commented on Oct 6, 2023

    @kaos
    Member

    I'd lean towards the DEBUG level, seeing as trace is likely overkill in most cases for end-users (risk they drown in log output rather than finding the issue)

  2. github-actions commented on Oct 31, 2025

    @github-actions
    Contributor

    This issue has been open for over one year without activity and is not labeled as a bug. It has been labeled as stale to invite any further updates. If you can confirm whether the issue is still applicable to the latest version of Pants, appears in other contexts, or its priority has changed, please let us know. Please feel free to close this issue if it is no longer relevant.

  3. added
    staleThis issue has not received activity in a while
    on Oct 31, 2025
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

    enhancementstaleThis issue has not received activity in a while

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions