mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-03 05:03:43 +08:00
Remove the dependency on python-systemd
This commit is contained in:
1
Vagrantfile
vendored
1
Vagrantfile
vendored
@@ -35,7 +35,6 @@ $script = <<SCRIPT
|
||||
redhat-rpm-config \
|
||||
rpm-build \
|
||||
swig \
|
||||
systemd-devel \
|
||||
https://kojipkgs.fedoraproject.org//packages/libmodulemd/1.1.3/1.fc27/x86_64/libmodulemd-1.1.3-1.fc27.x86_64.rpm
|
||||
cd /opt/module_build_service
|
||||
python setup.py develop
|
||||
|
||||
@@ -62,8 +62,8 @@ class BaseConfiguration(object):
|
||||
# 'modularity-wg',
|
||||
])
|
||||
|
||||
# Available backends are: console, file, journal.
|
||||
LOG_BACKEND = 'journal'
|
||||
# Available backends are: console and file
|
||||
LOG_BACKEND = 'console'
|
||||
|
||||
# Path to log file when LOG_BACKEND is set to "file".
|
||||
LOG_FILE = 'module_build_service.log'
|
||||
|
||||
@@ -163,7 +163,7 @@ def str_to_log_level(level):
|
||||
|
||||
|
||||
def supported_log_backends():
|
||||
return ("console", "journal", "file")
|
||||
return ("console", "file")
|
||||
|
||||
|
||||
def init_logging(conf):
|
||||
@@ -176,16 +176,6 @@ def init_logging(conf):
|
||||
logging.basicConfig(level=conf.log_level, format=log_format)
|
||||
log = logging.getLogger()
|
||||
log.setLevel(conf.log_level)
|
||||
elif log_backend == "journal":
|
||||
logging.basicConfig(level=conf.log_level, format=log_format)
|
||||
try:
|
||||
from systemd import journal
|
||||
except Exception:
|
||||
raise ValueError("systemd.journal module is not installed")
|
||||
|
||||
log = logging.getLogger()
|
||||
log.propagate = False
|
||||
log.addHandler(journal.JournalHandler())
|
||||
else:
|
||||
logging.basicConfig(filename=conf.log_file, level=conf.log_level,
|
||||
format=log_format)
|
||||
|
||||
Reference in New Issue
Block a user