diff options
author | Miroslav Los <miroslav.los@pantheon.tech> | 2019-11-20 10:20:08 +0100 |
---|---|---|
committer | Miroslav Los <miroslav.los@pantheon.tech> | 2019-11-25 13:56:19 +0100 |
commit | ce329a0f4a211752f56ab60241c86b45fa316ab9 (patch) | |
tree | c587f5793bc3edfa6c3d7279a7630a369e69fd44 /policyhandler/onap | |
parent | 05f475fb6ec2c4a1acd2698d29a4c12b116a1d36 (diff) |
Fix some logging handler's containing module
Signed-off-by: Miroslav Los <miroslav.los@pantheon.tech>
Issue-ID: DCAEGEN2-1936
Change-Id: I4169e8bf2f6562358306389f28e33be3e6c8ce29
Diffstat (limited to 'policyhandler/onap')
-rw-r--r-- | policyhandler/onap/CommonLogger.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/policyhandler/onap/CommonLogger.py b/policyhandler/onap/CommonLogger.py index 25b093f..1bd43df 100644 --- a/policyhandler/onap/CommonLogger.py +++ b/policyhandler/onap/CommonLogger.py @@ -3,6 +3,7 @@ # ================================================================================ # Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2019 Pantheon.tech. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -209,13 +210,13 @@ class CommonLogger: mode=self._sizeRotateMode, \ encoding=None, delay=False) elif self._typeLogger == 'stderrlogger': - self._logHandler = logging.handlers.StreamHandler(sys.stderr) + self._logHandler = logging.StreamHandler(sys.stderr) elif self._typeLogger == 'stdoutlogger': - self._logHandler = logging.handlers.StreamHandler(sys.stdout) + self._logHandler = logging.StreamHandler(sys.stdout) elif self._typeLogger == 'socketlogger': self._logHandler = logging.handlers.SocketHandler(self._socketHost, self._socketPort) elif self._typeLogger == 'nulllogger': - self._logHandler = logging.handlers.NullHandler() + self._logHandler = logging.NullHandler() if self._fields["style"] == CommonLogger.AuditFile or self._fields["style"] == CommonLogger.MetricsFile: self._logFormatter = logging.Formatter(fmt='%(begtime)s,%(begmsecs)03d+00:00|%(endtime)s,%(endmsecs)03d+00:00|%(message)s', datefmt=CommonLogger.DateFmt) |