SoftwareAG/cumulocity-microservice-templates

Change log level dynamically not working

ButKor opened this issue · 1 comments

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:

  1. Clone repository on main branch
  2. do mvn clean install
  3. create the application in my tenant & subscribe
  4. get bootstrap credentials and add them to application-dev.properties
  5. making sure there's management.endpoints.web.exposure.include=health, loggers line in application-dev.properties
  6. 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?

Found the problem and it was quite obvious: I was missing authentication.
curl http://localhost:8080/loggers -u '{tenant}/{user}:{pass}' works fine.