syncevo-http-server: fixed printing of server debug output
Python failed to call logSyncEvoOutput() after adding the additional 'process' parameter to LogOutput because it extracts all four parameters and then cannot pass them to logSyncEvoOutput(). Now logSyncEvoOutput() uses the new process information to instantiate a logger with the right prefix, using 'sync' as fallback for messages without that information (as before).
This commit is contained in:
parent
de77d5796d
commit
af59e95e2d
|
@ -32,9 +32,6 @@ from OpenSSL import SSL
|
|||
# for output from this script itself
|
||||
logger = logging.getLogger("syncevo-http")
|
||||
|
||||
# for output from core SyncEvolution
|
||||
loggerCore = logging.getLogger("sync")
|
||||
|
||||
class ChainedOpenSSLContextFactory(ssl.DefaultOpenSSLContextFactory):
|
||||
def __init__(self, privateKeyFileName, certificateChainFileName,
|
||||
sslmethod = SSL.SSLv3_METHOD):
|
||||
|
@ -372,8 +369,8 @@ evo2python = {
|
|||
"WARNING": logging.WARNING
|
||||
}
|
||||
|
||||
def logSyncEvoOutput(path, level, output):
|
||||
loggerCore.log(evo2python.get(level, logging.ERROR), "%s: %s", path, output)
|
||||
def logSyncEvoOutput(path, level, output, component):
|
||||
logging.getLogger(component or 'sync').log(evo2python.get(level, logging.ERROR), "%s: %s", path, output)
|
||||
|
||||
usage = """usage: %prog [options] http://localhost:<port>/<path>
|
||||
|
||||
|
|
Loading…
Reference in a new issue