segmentio / ecs-logs

Log forwarder for services ran by ecs-agent.
MIT License
114 stars 16 forks source link

stderr raw output marked as error? #33

Closed yields closed 8 years ago

yields commented 8 years ago

Wasn't sure if this is by design or not? any reason for this?

yields commented 8 years ago

for context, i'm using go-gracefully, which outputs some informational logs when exiting.

achille-roussel commented 8 years ago

This is by design to handle different levels for programs that don't produce structured logs. stdout => INFO stderr => ERROR This is also the behavior used by journald.

Once we're done with hackweek I'm gonna put together a CLI tool for helping with your use case so it's easier to integrate programs that we can't change the source code of with ecs-logs.

yields commented 8 years ago

i see, makes sense!

not a huge deal btw, i'm going to PR it with a .Log interface, especially with go it's nice that so many libraries allow you to hook your own logging.

achille-roussel commented 8 years ago

Isn't this what you're looking for? https://github.com/segmentio/ecs-logs-go/blob/master/logger.go

yields commented 8 years ago

oh i meant i'll pr go-gracefully with Log function that i can override, or just change it to to use the standard logger.

either way, not an issue with ecslogs! :)