Logging in Laravel Vapor (Papertrail, Flare, Sentry - nothing is working!)
I have a vapor project and I cannot get any form of logging to work. I have setup flare, sentry and papertrail but nothing registers.
I am using the vapor env:pull production (then push) commands to edit the config with my api keys. I have tested on non-vapor and it works fine there.
Other .env variables such as the database name are being accepted OK so I assume that its an issue to do with these packages running server-less opposed an env issue.
So AWS cloudwatch is already capturing all the logs (along with all the Lambda stuff too, that we do not really care about). There appear to be a few packages that are designed to forward from cloudwatch (which has a fairly quite interface!) through to papertrail. For example:
I got a reply from Taylor on Vapor. He told me that all logs are stored within cloudwatch... so it seems like at least for now this may be as far as it has been designed. For me, papertrail (or similar) with filtered, live tail logs has been extremely useful for both developing and debugging - especially big data crunching long running scripts in queues. I hope there is a work around to get this function working again with serverless!
The recommendation from the Vapor team currently is to use BugSnagg or Flare, but this does miss the point of application logging which is very useful to debug issues that do not cause exceptions.
Cloudwatch obviously logs the whole lot but compared to something like Papertrail its almost impossible to use it effectively.
You can connect Cloudwatch to papertrail, via a few methods as detailed here: