Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to bind properties under logging.level.* or someproperty.*=some_value

After i migrated from Spring boot 1.5 to 2.x i have the below problem:

APPLICATION FAILED TO START

Description:
Failed to bind properties under logging.level to java.util.Map<java.lang.String, java.lang.String>:

Reason: No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.lang.String, java.lang.String>]

Action:

Update your application's configuration

In properties I have

logging.level.*=debug

It works if I go back to version 1.5.x Can anyone point me in the right way?

UPDATE : The same problem happens when I use

someproperty.*=some_value

That means the .*= is not supported in SpringBoot 2.0 ?

like image 598
CostelD Avatar asked Aug 23 '18 15:08

CostelD


1 Answers

You need to explicitly mention logger name, if you are using SpringBoot 2.x.x, which you can notice when you compare documentation of both the versions.

SpringBoot 2.0.0

... using logging.level.<logger-name>=<level> where level is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, or OFF. ...

Eg:

logging.level.root=WARN

SpringBoot 1.5.4

... logging.level.*=LEVEL where 'LEVEL' is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF...

Eg:

logging.level.*=WARN
like image 124
Ravi Avatar answered Nov 07 '22 10:11

Ravi