fix in rndc config and newline in yadyn logging

This commit is contained in:
Wolfgang Hottgenroth 2019-11-28 14:42:30 +01:00
parent 055afe70e3
commit 8ffa321312
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
key "rndc-key" { key "rndc-key" {
algorithm hmac-md5; algorithm hmac-md5;
secret "$RNDCKEY"; secret "RNDCKEY";
}; };
controls { controls {

View File

@ -1,17 +1,18 @@
import sys import sys
import datetime
class Logger(object): class Logger(object):
@staticmethod @staticmethod
def log(data): def log(data):
with open(Logger.filename, 'a') as f: with open(Logger.filename, 'a') as f:
f.write(data) f.write(datetime.datetime.now().isoformat() + ' ' + data + "\n")
@staticmethod @staticmethod
def debug(data): def debug(data):
if Logger.debugFlag: if Logger.debugFlag:
with open(Logger.filename, 'a') as f: with open(Logger.filename, 'a') as f:
f.write(data) f.write(datetime.datetime.now().isoformat() + ' ' + data + "\n")
@staticmethod @staticmethod
def openlog(filename): def openlog(filename):