spring-cloud-netflix icon indicating copy to clipboard operation
spring-cloud-netflix copied to clipboard

Better log messages for eureka-clients

Open kvmw opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe.

When eureka-instance is registering itself during startup, it is logging the registration state with messages containing the eureka.instance.instand_id. the default instance_id uses the host-name (machine hostname) which usually is the same as default eureka.instance.hostname. After changing the eureka.instance.hostname without changing the instance_id, the log messages still showing the machine hostname (because instance_id is the same default one). This is confusing for some developers because they think the log message is showing them the old eureka.instance.hostname where in fact the message is not related to instance hostname.

example logs:

DiscoveryClient_MY-CLIENT/192.168.0.10:my-client: registering service...
DiscoveryClient_MY-CLIENT/192.168.0.10:my-client - registration status: 204

log format:

DiscoveryClient_<app name>/<host-name>:<app name>: message

Here is a sample issue which is the result of the same confusion

Describe the solution you'd like Adding extra info about the instance.hostname or changing the log format to make it clear that above value is the instance_id and not the hostname.

kvmw avatar May 17 '22 16:05 kvmw