Closed arminm closed 4 years ago
@arminm I think that's somewhat out of scope for this project, but also not quite correct - daytona
actually logs to stderr
, as that's the out-of-the-box default for the Go log
package. stdout
/stderr
are well-understood methods of handling different outputs. I believe the original intent behind sending daytona
logs to stderr
was to separate those logs from those generated by a child process, when daytona
is used as a container entrypoint.
In your case, I would suggest the use of stream redirection to send the output of your daytona
logs to stdout
, e.g. /daytona 2>&1
.
@arminm I've been wanting to move to a structured log output. I'll put something together soon.
@robison I know i had this issue with my own Go application on GCP and did try the redirect but it will still show up as errors because StackDriver specifically looks for a JSON format and severity
key (not even level
).
@broamski thank you thank you 🙏
hi @arminm - thanks for your patience. This was resolved in #50 and should be in the latest release. Thanks!
woohoo!! amazing! thank you so much @broamski and the team!
Daytona logs to
stdout
with no option for leveled logging, GCP picks up these logs as errors, and we get paged for "service throwing errors!" when in fact it was just normal Daytona logs.Can we configure Daytona to log in JSON format with a
severity
so platforms like GCP don't count it as error? It could be as easy as:I would suggest ZeroLog but anything that can log in JSON format is good.