Closed goetzc closed 4 years ago
What's happening here is that Supercronic reads the log of your underlying program then emits it back (those are the colors that are mangled here, not Supercronic's own log coloring). I'd suggest turning off log coloring in the jobs you run in your crontab.
That said, if you do want the colors and don't care to have Supercronic wrap your logging, then I think the right solution would be to just let you turn off the log wrapping. I'll put up a PR for this.
-passthrough-logs
if you'd like Supercronic to just leave your logs alone.That is nice and useful, thank you @krallin!
Running Supercronic directly in a Bash shell shows colors, but when inspecting
docker logs
, the Supercronic output is quoted or escaped which prevents showing the actual colors.Compared to other Cron implementations like the Debian's default Cron implementation which doesn't quote/escape the output and shows the colors, whenever called directly from the shell or from
docker logs
.This is the Supercronic output from within Bash inside Docker:
Output from
docker logs
when using Supercronic:\x1b[1m\x1b[35m (0.5ms)\x1b[0m BEGIN"
Output from
docker logs
when using Debian's Cron package: