justinianus / stdio-log
STDIO's Log Laravel.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/justinianus/stdio-log
This package is auto-updated.
Last update: 2025-11-17 10:08:34 UTC
README
Getting started with StdioLogHelper, use Composer command to add the package to your Laravel project's dependencies.
composer require justinianus/stdio-log composer dump-autoload
Then register new package service provider to config/app.php
'providers' => [ Justinianus\StdioLog\StdioServiceProvider::class, ],
Setup Channel
Create new channel 'slack-log' for Slack message into config/logging.php to send message log via Slack
'slack-log' => [ 'driver' => 'slack', 'url' => env('LOG_SLACK_WEBHOOK_URL'), 'username' => 'Laravel Log', 'emoji' => ':boom:', 'level' => env('LOG_LEVEL', 'critical'), ],
Add environment variable into .env for the incoming webhook receive from Slack application.
LOG_SLACK_WEBHOOK_URL=YOUR_INCOMING_WEBHOOK_SLACK_URL
Usage
Declare library before using.
use Justinianus\StdioLog\Helpers\StdioLogHelper;
Log for Back-End
StdioLogHelper::writeFileLog(StdioLogHelper::LOG_LEVEL_CONST, 'log-channel-name', Exception $exception, Request $request, [$booleanSendSlack]);
Callback for Front-End
StdioLogHelper::callback(Request $request, [$booleanSendSlack, StdioLogHelper::LOG_LEVEL_CONST, 'log-channel-name']);