You have two things here : a logger, and an appender. Unfortunately, you chose the same name for both, which doesn't make it very clear.
The logger's minimum level is set to warn, which means everything you log with this logger which doesn't have at least the warn level will be ignored.
Once a message is accepted by the logger, it's sent to one or several appenders (to a file, to the console, to a mail server, etc.). Each of these appenders may define a threshold. You could for example limit the messages in the console to errors, but accept warn messages in the log file.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…