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:
parent
0cb5b4370b
commit
dc401d6c3a
@ -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)
|
||||
|
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user