The log of applications is gold. It's an important part of the software, they represent the health of the application. By default, CakePHP will use the FileLog adapter which will write to /logs/ folder.
It's hard to track the live issues, and by hard I mean you will need to connect to the server, open the file on /logs/ and look at the issue which you want to investigate.
What do you think if your application sends the error directly to your team communication (Slack, Teams, RocketChat) application? Will be easier to know about a new error after some deployment? This error is sneaky, and can be in command applications. Often, we only look at the errors when the users report it.
For this sample I will use Slack, but this approach can be implemented for any application.
All we need is to create a Log adapter and configure it. So…let’s bake that:
Now we may get errors like this:
That’s all bakers! I hope this article can be useful and you can improve your logs.