Change log level dynamically not working
ButKor opened this issue · 1 comments
ButKor commented
I'm trying out the basic example, specifically the functionality to change the log level dynamically as described here: https://github.com/SoftwareAG/cumulocity-microservice-templates/tree/main/basic#changing-the-log-level-dynamically
However, this does not seem to work. Steps I've did:
- Clone repository on main branch
- do
mvn clean install
- create the application in my tenant & subscribe
- get bootstrap credentials and add them to application-dev.properties
- making sure there's
management.endpoints.web.exposure.include=health, loggers
line in application-dev.properties - Run build:
java -Dspring.profiles.active=dev -jar cumulocity-microservice-templates-basic-0.0.1-SNAPSHOT.jar
Service runs fine on my localhost, a curl http://localhost:8080/health
returns up. However, none of these calls returning logger info:
curl http://localhost:8080/loggers
curl http://localhost:8080/loggers/com.c8y.ms.templates.basic.service
curl http://localhost:8080/actuator/loggers
Am I missing something here? Is it working on your side?
ButKor commented
Found the problem and it was quite obvious: I was missing authentication.
curl http://localhost:8080/loggers -u '{tenant}/{user}:{pass}'
works fine.