{"repo":"danielme85/laravel-log-to-db","free":true,"listed":false,"github":"https://github.com/danielme85/laravel-log-to-db","clone":"git clone https://github.com/danielme85/laravel-log-to-db.git","description":"Custom Laravel and Lumen 5.6+ Log channel handler that can store log events to SQL or MongoDB databases. Uses Laravel/Monolog native logging functionality.","language":"PHP","stars":134,"topics":["laravel","logging","log","database","db","mysql","sql","mongodb","laravel-log","log-handler"],"license":"MIT","category":"databases-storage","readme_excerpt":"Laravel Log-to-DB Custom Laravel Log channel handler that can store log events to SQL or MongoDB databases. Uses Laravel native logging functionality through Monolog. Version compatibility Package Laravel PHP --------- --------- ----------- 5.x 12, 13 8.2+ 4.x 10, 11 8.1+ 3.x 5.6–9 7.2–8.0 ⚠️ Upgrading from v4 to v5? v4's default datetime format was broken and corrupted the stored datetime column. See Upgrading from v4 to v5: fixing broken datetime values for the fix. Installation Configuration Usage Fetching Logs Custom Eloquent Model Log Cleanup Upgrading from v4 to v5: fixing broken datetime values Processors Lumen Installation Local Testing With Docker Installation Use the composer require or add to composer.json. If you are using SQL database server to store log events you can use the migration included. The MongoDB driver does not require the migration. Copy the migration file for log the database table to your app (you can also do any changes you want or manually copy this file your database/migrations folder). Run the Laravel migration artisan command. For optional MongoDB support you need to install the mongodb/laravel-mongodb package Configuration You will need to add an array under 'channels' in your config/logging.php for Log-to-DB like so: These are the minimum required logging.php config settings to get started. Please note that the array index 'database' can be whatever string you like as long as it is unique to this logging config. You can also give the loggin","default_branch":null,"files":null,"tree":[],"storefront":"/r/danielme85","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/danielme85/laravel-log-to-db/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}