radoslawkoziol / monolog-masstrade
Monolog MassTrade Handler
1.0.1
2021-01-13 08:23 UTC
Requires
- php: ^7.2
- ext-json: *
- guzzlehttp/guzzle: ^6.3.3
- laravel/framework: 5.6.*
- lcobucci/jwt: 3.3
- monolog/monolog: 2.0 as 1.26.0
This package is auto-updated.
Last update: 2024-12-13 16:55:58 UTC
README
- install package
- add log channel in Laravel
config/logging.php
'masstrade' => [ 'driver' => 'custom', 'via' => radoslawkoziol\MonologMassTrade\MasstradeLogger::class, 'level' => 'debug' ],
daily
channel must be also configured, if is not add
'daily' => [ 'driver' => 'daily', 'path' => storage_path('logs/laravel.log'), 'level' => 'debug', 'days' => 7, ],
- default logging channel CANNOT be set to
masstrade
- add in
.env
url to public apiPUBLIC_API_MT_URL=https://public-api.masstrade.pl
USING
radoslawkoziol\MonologMassTrade\MassTradeLog::error($exception);
OPTIONAL
To get error handler working, add in file app/Exceptions/Handler.php
public function report(Throwable $exception) { if ($this->shouldReport($exception)) { radoslawkoziol\MonologMassTrade\MassTradeLog::error($exception); } parent::report($exception); }