mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
logging: do not configure any handlers by default
Do not configure stderr handler by default and let the application do the configuration. Fix ipa-dnskeysync-replica and ipa-dnskeysyncd not to add stderr handler twice. Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
0562359f31
commit
464516489f
@@ -10,7 +10,7 @@ This program should be run only on replicas, not on DNSSEC masters.
|
||||
|
||||
from binascii import hexlify
|
||||
from gssapi.exceptions import GSSError
|
||||
import logging
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -123,14 +123,10 @@ def ldap2replica_zone_keys_sync(log, ldapkeydb, localhsm):
|
||||
|
||||
|
||||
# IPA framework initialization
|
||||
ipalib.api.bootstrap(
|
||||
context='dns', confdir=paths.ETC_IPA,
|
||||
in_server=True, log=None, # no logging to file
|
||||
)
|
||||
standard_logging_setup(verbose=True, debug=True)
|
||||
ipalib.api.bootstrap(context='dns', confdir=paths.ETC_IPA, in_server=True)
|
||||
ipalib.api.finalize()
|
||||
standard_logging_setup(verbose=True, debug = True) # debug=ipalib.api.env.debug)
|
||||
log = root_logger
|
||||
log.setLevel(level=logging.DEBUG)
|
||||
|
||||
# Kerberos initialization
|
||||
PRINCIPAL = str('%s/%s' % (DAEMONNAME, ipalib.api.env.host))
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
|
||||
#
|
||||
|
||||
import logging
|
||||
import sys
|
||||
import ldap
|
||||
import ldapurl
|
||||
@@ -19,13 +20,12 @@ from ipaplatform.paths import paths
|
||||
from ipaserver.dnssec.keysyncer import KeySyncer
|
||||
|
||||
# IPA framework initialization
|
||||
api.bootstrap(
|
||||
context='dns', confdir=paths.ETC_IPA,
|
||||
in_server=True, log=None, # no logging to file
|
||||
)
|
||||
standard_logging_setup(verbose=True)
|
||||
api.bootstrap(context='dns', confdir=paths.ETC_IPA, in_server=True)
|
||||
api.finalize()
|
||||
standard_logging_setup(verbose=True, debug=api.env.debug)
|
||||
log = root_logger
|
||||
if api.env.debug:
|
||||
log.setLevel(logging.DEBUG)
|
||||
#log.addHandler(systemd.journal.JournalHandler())
|
||||
|
||||
# Global state
|
||||
|
||||
Reference in New Issue
Block a user