X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b9b4502bcddeccd794614bf6979d643f9f350877..c584cb69cdcfb377deed94745785330562a54ae3:/sdk/python/arvados/__init__.py diff --git a/sdk/python/arvados/__init__.py b/sdk/python/arvados/__init__.py index fa7e253a3d..bb97f3c1d8 100644 --- a/sdk/python/arvados/__init__.py +++ b/sdk/python/arvados/__init__.py @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + from __future__ import print_function from __future__ import absolute_import from future import standard_library @@ -37,10 +41,10 @@ import arvados.util as util # Set up Arvados logging based on the user's configuration. # All Arvados code should log under the arvados hierarchy. +log_format = '%(asctime)s %(name)s[%(process)d] %(levelname)s: %(message)s' +log_date_format = '%Y-%m-%d %H:%M:%S' log_handler = logging.StreamHandler() -log_handler.setFormatter(logging.Formatter( - '%(asctime)s %(name)s[%(process)d] %(levelname)s: %(message)s', - '%Y-%m-%d %H:%M:%S')) +log_handler.setFormatter(logging.Formatter(log_format, log_date_format)) logger = logging.getLogger('arvados') logger.addHandler(log_handler) logger.setLevel(logging.DEBUG if config.get('ARVADOS_DEBUG')