#Getting logs out of a Service?

1 messages · Page 1 of 1 (latest)

acoustic jungle
#

hey! is there any way of getting the logs out of a Service? trying to debug why my service is returning a Internal Server Error when curl'd from a container that it is bound - but can't seem to get the logs out of it. any pointers?

normal hinge
#

@acoustic jungle you can get them programmatically, but they're emitted alongside the engine telemetry, which you cam visualize in one of 4 ways:

  1. In the interactive TUI. Use dagger -E to stay in the TUI even after execution is complete. You can use up, down, enter, escape, to navigate the trace. Navigate to the execution of your service and you'll see the logs

  2. In the raw log output. Use dagger --progress=plain to get the raw logs, then you can sift through that

  3. Go the web trace view (press w in the TUI while executing. There is an initial setup, for free, then you can visualize all traces this way) --> this is what I use

  4. If you already have an opentelemetry-compatible trace & log collection system, you can configure dagger to send to that, then inspect the logs that way