Skip to content

Improve Logging #3587

Closed
Closed

Description

@aluzzardi

It's hard to figure out which operation logs belong too -- especially with lazy evaluation.

Something I'm discovering as I continue building is that the lazy execution makes debugging tricky -- it's sometimes difficult to tell what code in my build app generated which build instructions as expressed in the output.

https://discord.com/channels/707636530424053791/1034221596853932084/1035375037328404571

Proposal:

  • Bring back contextual logging from Europa (e.g. wrap logs with graphql path)
    • Instead of no such file or directory, show host.workdir.directory(path: “foo”).read: no such file or directory”
  • Switch Engine to use zerolog (like Europa) so Engine / BuildKit logs can be interleaved
  • Print GraphQL queries to logs Print graphql queries to logs #3561
    • Add a dagger.WithLogLevel() so the user can filter which logs are being dumped?
  • Logs are currently only printed only when using dagger.WithLogOutput
    • When an error happens, error is confusing (lack of context)
    • Proposal: Always dump logs to a file. Wrap errors in "See full logs at `

Activity

  1. added this to the 0.3.0 milestone on Oct 28, 2022
  2. shykes commented on Oct 28, 2022

    @shykes
    Contributor
    • Proposal: Always dump logs to a file. Wrap errors in "See full logs at `

    I think this deserves more discussion. In a production setting it may not be acceptable to have a "secret log file" accumulate somewhere. But maybe there's a way to mitigate this.

    IMO it would be better (but perhaps more difficult?) to 1) extract the relevant error message in the error itself, and 2) separately let users configure where and how to log

  3. helderco commented on Nov 14, 2022

    @helderco
    Contributor

    Switch Engine to use zerolog (like Europa) so Engine / BuildKit logs can be interleaved

    Yes please 🙂 I need JSON logs in the SDK to help improve how progress is shown to the user.

  4. helderco commented on Nov 14, 2022

    @helderco
    Contributor

    Proposal: Always dump logs to a file. Wrap errors in "See full logs at `

    I think this deserves more discussion. In a production setting it may not be acceptable to have a "secret log file" accumulate somewhere. But maybe there's a way to mitigate this.

    That's how npm/yarn does it, don't remember when exactly. You get an error and it says "go look at this file". It's a bit annoying but there's precedent in production.

  5. self-assigned this
    on Jan 5, 2023
  6. jpadams commented on Mar 23, 2023

    @jpadams
    Contributor

    From users trying Dagger:

    Complaints about the enormous stack trace that's produced. Why have the base64 encoded content in the output? It could use some TLC so that it makes the error you're interested in easy to find.

    It's unclear to others why layers are out of order. I presumed this was because it was some sort of multi stage docker build thing, but I don't actually know either 🙂

  7. helderco commented on Mar 29, 2023

    @helderco
    Contributor

    It's unclear to others why layers are out of order. I presumed this was because it was some sort of multi stage docker build thing, but I don't actually know either 🙂

    If that's regarding engine logs getting out of order, I've assumed it's because of the async nature of the engine (concurrency and parallelism). 🙂

  8. removed this from the v0.3.0 milestone on Aug 7, 2024
  9. locked and limited conversation to collaborators on Mar 24, 2026
  10. converted this issue into a discussion #12086 on Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions