diff --git a/ordigi/collection.py b/ordigi/collection.py index 9f382f3..0e74abf 100644 --- a/ordigi/collection.py +++ b/ordigi/collection.py @@ -428,10 +428,10 @@ class Collection: self.logger.info(f'File {dest_path} already sorted') return None elif dest_path.is_dir(): - self.logger.warning(f'File {dest_path} is a existing directory') + self.logger.info(f'File {dest_path} is a existing directory') return False elif dest_path.is_file(): - self.logger.warning(f'File {dest_path} already exist') + self.logger.info(f'File {dest_path} already exist') if remove_duplicates: if filecmp.cmp(src_path, dest_path): self.logger.info( diff --git a/ordigi/log.py b/ordigi/log.py index 170d819..8aee994 100644 --- a/ordigi/log.py +++ b/ordigi/log.py @@ -11,7 +11,12 @@ def level(verbose, debug): def get_logger(name='ordigi', level=30): - logging.basicConfig(format='%(levelname)s:%(message)s', level=level) + if level > 10: + format='%(levelname)s:%(message)s' + else: + format='%(levelname)s:%(name)s:%(message)s' + + logging.basicConfig(format=format, level=level) logging.getLogger('asyncio').setLevel(level) logger = logging.getLogger(name) return logger