MeekroDB Quick Start Docs ORM Docs FAQ
Download GitHub

Debug Logging

You can log all queries (including any errors they produce) to a file like this:

DB::$logfile = '/home/username/logfile.txt';

Alternatively, you can log this output to the screen like this:

DB::$logfile = fopen('php://output', 'w');

You can disable logging like this:

DB::$logfile = null;

If you want more fine-grained control over what gets logged, you can create your own post_run hook. For more information, see the hooks documentation.