From 8ffa321312239e495a01b091d29629d316d5a441 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Thu, 28 Nov 2019 14:42:30 +0100 Subject: [PATCH] fix in rndc config and newline in yadyn logging --- bind/named.conf.rndc | 2 +- server/logger.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bind/named.conf.rndc b/bind/named.conf.rndc index d4a75ed..71efc51 100644 --- a/bind/named.conf.rndc +++ b/bind/named.conf.rndc @@ -1,6 +1,6 @@ key "rndc-key" { algorithm hmac-md5; - secret "$RNDCKEY"; + secret "RNDCKEY"; }; controls { diff --git a/server/logger.py b/server/logger.py index a24bf78..ab4cb2f 100644 --- a/server/logger.py +++ b/server/logger.py @@ -1,17 +1,18 @@ import sys +import datetime class Logger(object): @staticmethod def log(data): with open(Logger.filename, 'a') as f: - f.write(data) + f.write(datetime.datetime.now().isoformat() + ' ' + data + "\n") @staticmethod def debug(data): if Logger.debugFlag: with open(Logger.filename, 'a') as f: - f.write(data) + f.write(datetime.datetime.now().isoformat() + ' ' + data + "\n") @staticmethod def openlog(filename):