Installation
Install the plugin in an existing CakePHP application:
composer require dereuromark/cakephp-databaselog
bin/cake plugin load DatabaseLogComposer checks the supported runtime versions. The package manifest defines the requirements.
The default connection needs the PDO SQLite driver and a writable application logs directory. To use a different database, configure an application datasource and select its name with DatabaseLog.connection before plugin bootstrap.
Migrations
The migrations plugin is optional for development auto-creation, but provides schema setup and upgrades for production. If your application does not have it installed and loaded:
composer require cakephp/migrations
bin/cake plugin load MigrationsFor the default SQLite connection, use:
bin/cake migrations migrate -p DatabaseLog -c database_logFor another configured connection, replace database_log with that connection name. Omitting -c selects the application's default migration connection, which may differ from the logging connection.
Continue with getting started to configure the log engines and verify a write.