diff --git a/rwx/log/__init__.py b/rwx/log/__init__.py index 12fb781..3b245ae 100644 --- a/rwx/log/__init__.py +++ b/rwx/log/__init__.py @@ -7,9 +7,14 @@ import sys def get_file_logger(name: str) -> logging.Logger: """Return a file logger.""" # formatter - formatter = logging.Formatter( - "%(name)s: %(asctime)s | %(levelname)s | %(filename)s:%(lineno)s | %(process)d >>> %(message)s", - ) + items = [ + "%(name)s: %(asctime)s", + "%(levelname)s", + "%(filename)s:%(lineno)s", + "%(process)d >>> %(message)s", + ] + template = " | ".join(items) + formatter = logging.Formatter(template) # handler out_handler = logging.StreamHandler(stream=sys.stdout) out_handler.setFormatter(formatter)