2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-28 20:39:40 +00:00

Fix mistake in trying to log stdout and stderr and clean up formatting

This commit is contained in:
jbjohnso 2014-04-23 10:18:45 -04:00
parent 0cb5b4370b
commit dc401d6c3a
2 changed files with 4 additions and 3 deletions

View File

@ -170,7 +170,8 @@ class Logger(object):
else:
textrecord = textdate + data + ']'
else:
textrecord = textdate + data + '\n'
if not textrecord.endswith('\n'):
textrecord = textdate + data + '\n'
self.textfile.write(textrecord)
fcntl.flock(self.textfile, fcntl.LOCK_UN)
fcntl.flock(self.binfile, fcntl.LOCK_EX)

View File

@ -54,8 +54,8 @@ def _daemonize():
os.open(os.devnull, os.O_RDWR)
os.dup2(0, 1)
os.dup2(0, 2)
sys.stdout = log.logger('stdout')
sys.stderr = log.logger('stderr')
sys.stdout = log.Logger('stdout')
sys.stderr = log.Logger('stderr')
def _updatepidfile():