15👍
✅
Either way will work, because the logger named ''
is the root logger. Specifying the top-level key root
makes it clearer what you’re doing if you’re configuring a lot of loggers – the ''
logger configuration could be lost inside a group of others, whereas the root
key is adjacent to the loggers
key and so (in theory) should stand out more.
To reiterate, the key named root
is a top-level key; it’s not under loggers
.
Source:stackexchange.com