Download the PHP package tolawho/loggy without Composer
On this page you can find all versions of the php package tolawho/loggy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tolawho/loggy
More information about tolawho/loggy
Files in tolawho/loggy
Informations about the package loggy
Supports Laravel 5 writing separate log files with multiple channel.
Requirements
Loggy >= 1.0.0 requires Laravel 5.
Installation
Require this package with Composer
Quick Start
Once Composer has installed or updated your packages you need to register Loggy with Laravel itself. Open up config/app.php and find the providers key, towards the end of the file, and add Tolawho\Loggy\ServiceProvider:class, to the end:
Now find the aliases key, again towards the end of the file, and add 'Loggy' => Tolawho\Loggy\Facades\Loggy::class, to have easier access to the Loggy:
Now that you have both of those lines added to config/app.php we will use Artisan to publish the new config file:
The example config:
Explain:
- channels.event: The
eventis name of channel do you want. Expayment,audit - channels.event.log: The name of log file.
- channels.event.daily: True if you want write log file daily like as
event-2017-03-31.log. - channels.event.level:
debug,info,notice,warning,error,critical,alert,emergency
At this point you can now begin using Loggy
Configuration
Once Composer has installed or updated your packages you need to register Loggy with Laravel itself. Open up config/app.php and find the providers key towards the bottom and add:
You can add the Loggy Facade, to have easier access to the Loggy.
You can find the default configuration file at vendor/tolawho/loggy/src/config.php.
You should use Artisan to copy the default configuration file from the /vendor directory to /config/loggy.php with the following command:
Usage
You call the Loggy like you would: