From a3293efc4826c2528e7a740273d0bf424ba874ea Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Mon, 15 Feb 2021 14:09:33 +0100 Subject: [PATCH] Add time and level to default logging formatter --- spacy/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/util.py b/spacy/util.py index aa9bf301e..ce1022d25 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -70,7 +70,7 @@ CONFIG_SECTION_ORDER = ["paths", "variables", "system", "nlp", "components", "co logger = logging.getLogger("spacy") logger_stream_handler = logging.StreamHandler() -logger_stream_handler.setFormatter(logging.Formatter("%(message)s")) +logger_stream_handler.setFormatter(logging.Formatter("[%(asctime)s] [%(levelname)s] %(message)s")) logger.addHandler(logger_stream_handler)