aptible / supercronic

Cron for containers
MIT License
1.91k stars 115 forks source link

Extra logging for each log #57

Closed eyaydin closed 4 years ago

eyaydin commented 4 years ago

Hi. Thanks for this beautiful package.

We are seeing an extra line of unnecessary log whenever our log received. For example:

Feb 12 05:36:15 5c1e5dd859a6 test-cron time="2020-02-12T13:36:10Z" level=info channel=stderr iteration=56 job.command="php artisan test:test" job.position=6 job.schedule="30 */2 * * *"

Feb 12 05:36:15 5c1e5dd859a6 test-cron time="2020-02-12T13:36:10Z" level=info msg="message content here " channel=stderr iteration=56 job.command="php artisan test:test" job.position=6 job.schedule="30 */2 * * *"

Here, second log record is legit, but the first one is not created by us (there is no msg field in the first log). And we are seeing logs like the first one here for every log that we recorded.

This results in too much logging space.

Is there any configuration we are missing and/or misusing?

By the way, we are using v0.1.5.

Thanks!

krallin commented 4 years ago

Supercronic captures your logging and adds a little bit of context around it, but I understand this isn't desirable if your comand already outputs structured logging. You'll be able to turn that off as of #67, which adds a -passthrough-logs flag to avoid decorating your logs. #67 also adds a -quiet flag to remove informational messages (I really think turning using that is a bad idea, since it'll make it harder to understand if your command isn't running, but that's up to you).

berkankisaoglu commented 4 years ago

Thanks @krallin! that's helpful to know. Is there any plans to deploy specific builds so that we can download prepackaged binaries instead of building ours or no?

https://github.com/aptible/supercronic/releases/tag/v0.1.10 + https://github.com/aptible/supercronic/commit/d00ab63aeb19ad704d2cc2af8972826cfb55c5d8

krallin commented 4 years ago

@berkankisaoglu unfortunately I don't work at @aptible anymore so I can't do a release myself: there used to be automation to create releases on tags automatically, but I think it bitrotted (I have access to the repo to create merge PRs and tags, but I can't grant access to e.g. Travis to submit builds for releases). I did ping @fancyremarker for help with this on the Aptible side of things so there should be a release at some point :)

fancyremarker commented 4 years ago

@berkankisaoglu the Travis release automation should be working again; you can access the latest release at https://github.com/aptible/supercronic/releases/tag/v0.1.11