The logging to file page, https://docs.phalcon.io/en/3.0.1/reference/logging.html, does not provide much information on how you might use loggong for recording unusual events in an active Web site. How do you make it available efficiently for irregular use?
I have a need to log some activity and the Phalcon log to file would be the best starting point, using mostly Phalcon code instead of my own code. I am thinking of making the logging available as a service so that it is always available anywhere. While the log would not be used in many page views, when it is used, it can be in any page and used several times.
What would be the easiest way to configure it in one place and grab it in any code?
If I start it in service.php, how do I access ->log() in somewhere like indexAction()?