Added paramiko lodger creation

This commit is contained in:
John W Kerns 2017-09-01 17:53:22 -07:00
parent 5f085c5eb1
commit 1b15bf25fb

View file

@ -31,7 +31,10 @@ class log_management:
self.logfile = "/etc/checkmyip/checkmyip.log"
self._publish_methods()
self.can_log = True
try:
paramiko.util.log_to_file('/etc/checkmyip/ssh.log')
except IOError:
self._create_log_dir()
def _logger(self, data):
logdata = time.strftime("%Y-%m-%d %H:%M:%S") + ": " + data + "\n"
if self.can_log: