diff --git a/ChangeLog.md b/ChangeLog.md index b8e2766..5608088 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -13,6 +13,8 @@ repository history](https://github.com/ddclient/ddclient/commits/master). * The default web service for `--webv4` and `--webv6` has changed from Google Domains (which is shutting down) to ipify. [5b104ad1](https://github.com/ddclient/ddclient/commit/5b104ad116c023c3760129cab6e141f04f72b406) + * All log messages are now written to STDERR, not a mix of STDOUT and STDERR. + [#676](https://github.com/ddclient/ddclient/pull/676) ### New features diff --git a/ddclient.in b/ddclient.in index 52a03c6..3ae7cdb 100755 --- a/ddclient.in +++ b/ddclient.in @@ -2420,15 +2420,15 @@ sub logmsg { } } } -sub msg { logmsg(fh => *STDOUT, sprintf(shift, @_)); } -sub verbose { logmsg(fh => *STDOUT, email => 1, pfx => pop, sprintf(shift, @_)) if opt('verbose'); } -sub info { logmsg(fh => *STDOUT, email => 1, pfx => 'INFO:', sprintf(shift, @_)) if opt('verbose'); } -sub debug { logmsg(fh => *STDOUT, pfx => 'DEBUG:', sprintf(shift, @_)) if opt('debug'); } -sub debug2 { logmsg(fh => *STDOUT, pfx => 'DEBUG:', sprintf(shift, @_)) if opt('debug') && opt('verbose'); } -sub warning { logmsg( email => 1, pfx => 'WARNING:', sprintf(shift, @_)); } -sub fatal { logmsg( email => 1, pfx => 'FATAL:', sprintf(shift, @_)); sendmail(); exit(1); } -sub success { logmsg(fh => *STDOUT, email => 1, pfx => 'SUCCESS:', sprintf(shift, @_)); } -sub failed { logmsg( email => 1, pfx => 'FAILED:', sprintf(shift, @_)); $result = 'FAILED'; } +sub msg { logmsg( sprintf(shift, @_)); } +sub verbose { logmsg(email => 1, pfx => pop, sprintf(shift, @_)) if opt('verbose'); } +sub info { logmsg(email => 1, pfx => 'INFO:', sprintf(shift, @_)) if opt('verbose'); } +sub debug { logmsg( pfx => 'DEBUG:', sprintf(shift, @_)) if opt('debug'); } +sub debug2 { logmsg( pfx => 'DEBUG:', sprintf(shift, @_)) if opt('debug') && opt('verbose'); } +sub warning { logmsg(email => 1, pfx => 'WARNING:', sprintf(shift, @_)); } +sub fatal { logmsg(email => 1, pfx => 'FATAL:', sprintf(shift, @_)); sendmail(); exit(1); } +sub success { logmsg(email => 1, pfx => 'SUCCESS:', sprintf(shift, @_)); } +sub failed { logmsg(email => 1, pfx => 'FAILED:', sprintf(shift, @_)); $result = 'FAILED'; } sub prettytime { return scalar(localtime(shift)); } sub prettyinterval {