We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello. Logger function changed since Weewx 4.x,. You can make it backwards compatible and adopt the new one by changing from line 38 to 48
def logmsg(dst, msg): syslog.syslog(dst, 'zabbix: %s' % msg) def logdbg(msg): logmsg(syslog.LOG_DEBUG, msg) def loginf(msg): logmsg(syslog.LOG_INFO, msg) def logerr(msg): logmsg(syslog.LOG_ERR, msg)
with this
# Test for new-style weewx v4 logging by trying to import weeutil.logger import weeutil.logger import logging try: log = logging.getLogger(__name__) def logdbg(msg): log.debug(msg) def loginf(msg): log.info(msg) def logerr(msg): log.error(msg) except ImportError: # Old-style weewx logging import syslog def logmsg(level, msg): syslog.syslog(level, 'Zabbix Extension: %s' % msg) def logdbg(msg): logmsg(syslog.LOG_DEBUG, msg) def loginf(msg): logmsg(syslog.LOG_INFO, msg) def logerr(msg): logmsg(syslog.LOG_ERR, msg)
Thanks
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello.
Logger function changed since Weewx 4.x,. You can make it backwards compatible and adopt the new one by changing from line 38 to 48
with this
Thanks
The text was updated successfully, but these errors were encountered: