Verified Commit ce53a759 authored by Martin Abbrent's avatar Martin Abbrent 💬
Browse files

Switch to custom logger namespace

parent d385d03c
......@@ -52,6 +52,8 @@ class Mc:
secret_key=self.secret_key,
)
self.logger = logging.getLogger('minio-cli-wrapper')
def _init_config(self):
self.proto = 'https://' if self.secure else 'http://'
self.config['aliases'][self.alias]['url'] = '{proto}{url}'.format(proto=self.proto,
......@@ -73,7 +75,7 @@ class Mc:
raise MinIoClientError(ret.stderr)
if not confidential:
logging.info(ret.stdout)
self.logger.info(ret.stdout)
return json.loads(ret.stdout)
......@@ -85,7 +87,7 @@ class Mc:
# manually remove confidential parts before logging
ret['secretKey'] = '*****'
logging.info(ret)
self.logger.info(ret)
def policy_add(self, policy_name: str, policy: dict):
policy_file = tempfile.NamedTemporaryFile(mode='w+')
......
......@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
setuptools.setup(
name='minio_cli_wrapper',
version='0.0.4',
version='0.0.5',
author='Martin Abbrent',
author_email='martin.abbrent@ufz.de',
description='Wrapper to control MinIO commands that are not covered by the MinIO Python SDK',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment