Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to bind properties under 'logging.level.com.netflix.eureka' to org.springframework.boot.logging.LogLevel

i'm using Eureka Server with Spring Boot. The Error:

org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'logging.level.com.netflix.eureka' to org.springframework.boot.logging.LogLevel


pom.xml

application.properties

spring.application.name=eureka-server
server.port=8761

# avoid registering itself as a client
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
logging.level.com.netflix.eureka=ON
logging.level.com.netflix.discovery=ON
like image 656
sabbar Avatar asked Mar 02 '23 08:03

sabbar


1 Answers

You are using an invalid value for your two properties:

logging.level.com.netflix.eureka
logging.level.com.netflix.discovery

How you can see in your stash, you have to set one of the supported values from enum class: org.springframework.boot.logging.LogLevel

package org.springframework.boot.logging;

public enum LogLevel {

    TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF

}

So for example if you want to see debug level messages and above you can set it like that:

logging.level.com.netflix.eureka=debug
logging.level.com.netflix.discovery=debug
like image 111
Dušan Salay Avatar answered Mar 05 '23 14:03

Dušan Salay