diff --git a/elephant/asset/asset.py b/elephant/asset/asset.py index d1fe9c646..510bf3b6f 100644 --- a/elephant/asset/asset.py +++ b/elephant/asset/asset.py @@ -166,8 +166,9 @@ # Create logger and set configuration logger = logging.getLogger(__file__) log_handler = logging.StreamHandler() -log_handler.setFormatter(logging.Formatter("[%(asctime)s] asset -" - " %(levelname)s: %(message)s")) +log_handler.setFormatter( + logging.Formatter(f"[%(asctime)s] {__name__[__name__.rfind('.')+1::]} -" + " %(levelname)s: %(message)s")) logger.addHandler(log_handler) logger.propagate = False