We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Logging any error, info, debug to database (like log4j)

Dear experts,

Is there any good example how to log custom error, info or debug in phalcon to database? I loved the way log4j.

Thank you

Apache has a log4php project. It's not built with Phalcon in mind, but it is pretty straightforward. https://logging.apache.org/log4php/

There is also built-in Phalcon logging functionality: https://docs.phalcon.io/en/latest/reference/logging.html

I would suggest you Monolog.

https://github.com/Seldaek/monolog

it's really powerful