mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
27 lines
527 B
PHP
27 lines
527 B
PHP
<?php
|
|
|
|
namespace App\Classes\General;
|
|
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
class LogHelper
|
|
{
|
|
protected static $channelName;
|
|
|
|
public static function channel($channelName)
|
|
{
|
|
self::$channelName = $channelName;
|
|
return new static;
|
|
}
|
|
|
|
public static function info($message)
|
|
{
|
|
if(env('LARAVEL_VAPOR_ENABLED')){
|
|
Log::channel(self::$channelName.'_vapor')->info($message);
|
|
}
|
|
else{
|
|
Log::channel(self::$channelName)->info($message);
|
|
}
|
|
}
|
|
}
|