Logs of a Scheduled lambda doesn't appear in CloudWatch
icehockeystar opened this issue · 4 comments
Given following Scheduled lambda:
object Analyser {
private val logger = LoggerFactory.getLogger(Analyser::class.java)
@Scheduled(cron = everyMinute, id = "analyseOffers")
fun analyseOffers() {
logger.warn("Analysing offers...")
TODO("implement analysing offers.")
}
}
in opposite to calls over API gateways the logging in this case doesn't apper in the cloud wathc logs. Neither info about TODO exception appears there. What do I do wrong?
Apparently it's issue with the @Scheduled(id = "analyseOffers")
. If I give this individual id and try to start the app locally the scheduled task doesn't get executed at all. After removing id
and merging all lambdas the logging works.
I'll try to take a look into the problem with ids. But yeah, it seems that the problem is somehow near the Quartz local emulation :)
I posted about a similar issue I'm having with @Scheduled
and AWS lambda. But it seems like it's not exactly the same issue (it's not related to Quartz local emulation), so I'm opening a new issue at #96
@msiemens the library is barely supported right now. I ended up with setting up my own labmdas project and own terraform.