If I want to process the logging of my SQL queries, I have 2 options:
- Enabling the
MySQL Log Function on - Writing a custom trace class
I prefer to do number 2. Why?
Because it is more manageable. You can easily distinguish from INSERT DELETE UPDATE etc. Requests But this is not the only advantage of your own trace class, because creating trace files (called logs) simplifies administrative tasks. You can structure the trace output, put it in a separate database, save it in an XML or JSON file. You can order things the way you want.
source share