Package Data | |
---|---|
Maintainer Username: | fryiee |
Maintainer Contact: | hi@craigberry.co (Craig Berry) |
Package Create Date: | 2017-09-07 |
Package Last Update: | 2017-09-07 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-09-08 15:07:21 |
Package Statistics | |
---|---|
Total Downloads: | 71 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
A custom Log class based on Monolog's Logger.
composer require fryiee/custom_log
Add LOG_PATH
to your .env.
The package assumes the following:
LOG_PATH=laravel
will assume the same storage location as the Log
facade
using storage_path('logs')
LOG_PATH=some/path/
will use that path to store logs. e.g. ./custom_logs
LOG_PATH=
will default to the packages' own location of fryiee/custom_log/logs
Adding LOG_DATE=true
to your .env will allow your logs to be dated in the same way as core Laravel logs
(Y-m-d format).
use Fryiee\CustomLog\Log;
...
Log::info('name', 'message');
The logger uses the name to generate the log file. You can also use slashes to set a nested location:
Log::info('nested/name', 'message'); // creates a file at logs/nested/name.log