fix in rndc config and newline in yadyn logging
This commit is contained in:
parent
055afe70e3
commit
8ffa321312
@ -1,6 +1,6 @@
|
|||||||
key "rndc-key" {
|
key "rndc-key" {
|
||||||
algorithm hmac-md5;
|
algorithm hmac-md5;
|
||||||
secret "$RNDCKEY";
|
secret "RNDCKEY";
|
||||||
};
|
};
|
||||||
|
|
||||||
controls {
|
controls {
|
||||||
|
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user