Move logger to common, fix buffering

This commit is contained in:
Joshua Boniface 2021-06-01 18:50:26 -04:00
parent 3a5226b893
commit 7dea5d2fac
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ class Logger(object):
if self.config['file_logging']: if self.config['file_logging']:
self.logfile = self.config['log_directory'] + '/pvc.log' self.logfile = self.config['log_directory'] + '/pvc.log'
# We open the logfile for the duration of our session, but have a hup function # We open the logfile for the duration of our session, but have a hup function
self.writer = open(self.logfile, 'a', buffering=1) self.writer = open(self.logfile, 'a', buffering=0)
self.last_colour = '' self.last_colour = ''
self.last_prompt = '' self.last_prompt = ''

View File

@ -42,8 +42,8 @@ from rados import Rados
from daemon_lib.zkhandler import ZKHandler from daemon_lib.zkhandler import ZKHandler
import pvcnoded.log as log
import pvcnoded.fencing as fencing import pvcnoded.fencing as fencing
import daemon_lib.log as log
import daemon_lib.common as common import daemon_lib.common as common
import pvcnoded.VMInstance as VMInstance import pvcnoded.VMInstance as VMInstance