2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 18:42:29 +00:00

Configure the logdirectory from the configuration file

- Set the log directory using the configuration manager
- Add _get_logdirectory function to retrieve the log directory path
- Update _redirectoutput to use the new log directory setting
This commit is contained in:
Hengli Kuang
2025-08-06 04:31:38 -04:00
parent bab169269c
commit 816f3be2ed

View File

@@ -94,6 +94,7 @@ def _daemonize():
def _redirectoutput():
os.umask(63)
configmanager.set_global('logdirectory', _get_logdirectory())
sys.stdout = log.Logger('stdout', buffered=False)
sys.stderr = log.Logger('stderr', buffered=False)
@@ -340,3 +341,6 @@ def _get_connector_config(session):
host = conf.get_option(session, 'bindhost')
port = conf.get_int_option(session, 'bindport')
return (host, port)
def _get_logdirectory():
return conf.get_option('globals', 'logdirectory')