vdirsyncer icon indicating copy to clipboard operation
vdirsyncer copied to clipboard

FR: Split loggers between stdout and stderr

Open tvogel opened this issue 3 years ago • 2 comments

Because I am using vdirsyncer together with https://habilis.net/cronic/ from cron, it would be better if only real errors (and maybe warnings) would get logged to stderr but not INFO messages such as "Syncing <calendar_name>". Because them getting sent to stderr makes cronic (justifiably) interpret them as an error.

I found an example how you might be able to implement that easily: https://stackoverflow.com/a/16066513/119725

  • vdirsyncer version: 0.18.0
  • Python version: 3.9.15
  • operating system: Linux 3.10.0-1160.53.1.el7.x86_64
  • config file: n/a

tvogel avatar Nov 23 '22 14:11 tvogel

Not a bad idea, we currently don't print anything to stdout anyway.

WhyNotHugo avatar Nov 24 '22 14:11 WhyNotHugo

Overriding the default logger configuration sounds like a reasonable approach for this.

WhyNotHugo avatar Dec 03 '22 15:12 WhyNotHugo