Python syslog.LOG_LOCAL7 Examples
The following are 2
code examples of syslog.LOG_LOCAL7().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
syslog
, or try the search function
.
Example #1
Source File: staticip.py From HPN-Scripting with MIT License | 5 votes |
def main(): config = get_config_port_ip() list_live_ip(config) for i in config.keys(): if arp(i) == config[i]: continue if arp(i) == 'none': syslog.openlog( 'WARNING', 0, syslog.LOG_LOCAL7 ) syslog.syslog(syslog.LOG_ALERT, '%s %s IS NOT ACTIVE ' % (socket.gethostname(), i)) else: syslog.openlog( 'WARNING', 0, syslog.LOG_LOCAL4 ) syslog.syslog(syslog.LOG_ALERT, '%s %s IS IN WRONG PORT %s AND SHOULD BE IN %s ' % (socket.gethostname(), i, arp(i),config[i] ))
Example #2
Source File: logger.py From clonedigger with GNU General Public License v3.0 | 5 votes |
def _writelog(self, priority, message): """overridden from AbstractLogger""" import syslog if isinstance(message, str): message = message.encode(self.encoding, 'replace') syslog.syslog(priority | syslog.LOG_LOCAL7, message)