How do I enable logging for Spring Schedule annotation?

Viewed 756

I am trying to debug some issues in some of our cron jobs that use @Schedule. The following link suggests turning on logging for org.springframework.scheduling.*. https://community.pivotal.io/s/article/methods-annotated-with-scheduled-stops-working?language=en_US I have tried this a few ways in the yaml with no additional logs showing up.

logging:
  level:
    ROOT: INFO
    com.netflix.discovery.shared.resolver.aws.ConfigClusterResolver: WARN
    org.springframework.scheduling: DEBUG

I have tried

org.springframework.scheduling: DEBUG
org.springframework.*: DEBUG
org.springframework.scheduling.annotation: DEBUG
1 Answers

When using application.properties add the following to your config file:

logging.level.org.springframework.scheduling=TRACE
Related