mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
ab9d1e75fc
Remove logger arguments in all functions and logger attributes in all objects, with the exception of API object logger, which is now deprecated. Replace affected logger calls with module-level logger calls. Reviewed-By: Martin Basti <mbasti@redhat.com>
24 lines
757 B
Plaintext
24 lines
757 B
Plaintext
import logging
|
|
import os
|
|
|
|
from ipaplatform.paths import paths
|
|
from ipalib import api
|
|
|
|
logger = logging.getLogger(os.path.basename(__file__))
|
|
|
|
api.bootstrap(context='server', confdir=paths.ETC_IPA, log=None) (ref:wsgi-app-bootstrap)
|
|
try:
|
|
api.finalize() (ref:wsgi-app-finalize)
|
|
except Exception as e:
|
|
logger.error('Failed to start IPA: %s', e)
|
|
else:
|
|
logger.info('*** PROCESS START ***')
|
|
|
|
# This is the WSGI callable:
|
|
def application(environ, start_response): (ref:wsgi-app-start)
|
|
if not environ['wsgi.multithread']:
|
|
return api.Backend.session(environ, start_response)
|
|
else:
|
|
logger.error("IPA does not work with the threaded MPM, "
|
|
"use the pre-fork MPM") (ref:wsgi-app-end)
|