197 lines
5.9 KiB
PHP
197 lines
5.9 KiB
PHP
<?php
|
|
|
|
use Monolog\Handler\StreamHandler;
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Default Log Channel
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| This option defines the default log channel that gets used when writing
|
|
| messages to the logs. The name specified in this option should match
|
|
| one of the channels defined in the "channels" configuration array.
|
|
|
|
|
*/
|
|
|
|
'default' => 'daily',
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Log Channels
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here you may configure the log channels for your application. Out of
|
|
| the box, Laravel uses the Monolog PHP logging library. This gives
|
|
| you a variety of powerful log handlers / formatters to utilize.
|
|
|
|
|
| Available Drivers: "single", "daily", "slack", "syslog",
|
|
| "errorlog", "monolog",
|
|
| "custom", "stack"
|
|
|
|
|
*/
|
|
|
|
'channels' => [
|
|
'stack' => [
|
|
'driver' => 'stack',
|
|
'channels' => ['single'],
|
|
],
|
|
|
|
'single' => [
|
|
'driver' => 'single',
|
|
'path' => storage_path('logs/laravel.log'),
|
|
'level' => 'debug',
|
|
],
|
|
|
|
'daily' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/laravel.log'),
|
|
'level' => 'debug',
|
|
'days' => 7,
|
|
],
|
|
'coupon_card' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/shop_coupon.log'),
|
|
'level' => 'info',
|
|
'days' => 7,
|
|
],
|
|
'pay_order' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/pay_order.log'),
|
|
'level' => 'info',
|
|
'days' => 30,
|
|
],
|
|
'notify_order' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/notify_order.log'),
|
|
'level' => 'info',
|
|
'days' => 90,
|
|
],
|
|
'weixin_notify_order' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/weixin_notify_order.log'),
|
|
'level' => 'info',
|
|
'days' => 90,
|
|
],
|
|
'alipay_notify_order' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/alipay_notify_order.log'),
|
|
'level' => 'info',
|
|
'days' => 90,
|
|
],
|
|
'unionpay_notify_order' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/unionpay_notify_order.log'),
|
|
'level' => 'info',
|
|
'days' => 90,
|
|
],
|
|
'citpay_notify_order' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/citpay_notify_order.log'),
|
|
'level' => 'info',
|
|
'days' => 90,
|
|
],
|
|
'usdtpay_notify_order' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/usdtpay_notify_order.log'),
|
|
'level' => 'info',
|
|
'days' => 90,
|
|
],
|
|
'merchant_order_notify_order' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/merchant_order_notify_order.log'),
|
|
'level' => 'info',
|
|
'days' => 90,
|
|
],
|
|
'commission' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/fail_commission.log'),
|
|
'tap' => [App\Logging\SmsFormatter::class],
|
|
'level' => 'info',
|
|
'days' => 7,
|
|
],
|
|
//支付接口成功支付
|
|
'pay_success' => [
|
|
'driver' => 'daily',
|
|
'path' => base_path('paylogs/pay_success.log'),
|
|
'tap' => [App\Logging\SmsFormatter::class],
|
|
'level' => 'info',
|
|
'days' => 30,
|
|
],
|
|
//支付接口回到失败
|
|
'pay_fail' => [
|
|
'driver' => 'daily',
|
|
'path' => base_path('paylogs/pay_fail.log'),
|
|
'tap' => [App\Logging\SmsFormatter::class],
|
|
'level' => 'info',
|
|
'days' => 30,
|
|
],
|
|
//支付订单更新失败
|
|
'pay_order_faile' => [
|
|
'driver' => 'daily',
|
|
'path' => base_path('paylogs/pay_order_faile.log'),
|
|
'tap' => [App\Logging\SmsFormatter::class],
|
|
'level' => 'info',
|
|
'days' => 30,
|
|
],
|
|
//支付订单更新成功
|
|
'pay_order_success' => [
|
|
'driver' => 'daily',
|
|
'path' => base_path('paylogs/pay_order_success.log'),
|
|
'tap' => [App\Logging\SmsFormatter::class],
|
|
'level' => 'info',
|
|
'days' => 30,
|
|
],
|
|
//自动采集结算代理佣金
|
|
'auto_commission' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('collect/auto_commission.log'),
|
|
'tap' => [App\Logging\SmsFormatter::class],
|
|
'level' => 'info',
|
|
'days' => 60,
|
|
],
|
|
|
|
'slack' => [
|
|
'driver' => 'slack',
|
|
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
|
'username' => 'Laravel Log',
|
|
'emoji' => ':boom:',
|
|
'level' => 'critical',
|
|
],
|
|
|
|
'stderr' => [
|
|
'driver' => 'monolog',
|
|
'handler' => StreamHandler::class,
|
|
'with' => [
|
|
'stream' => 'php://stderr',
|
|
],
|
|
],
|
|
|
|
'syslog' => [
|
|
'driver' => 'syslog',
|
|
'level' => 'debug',
|
|
],
|
|
|
|
'errorlog' => [
|
|
'driver' => 'errorlog',
|
|
'level' => 'debug',
|
|
],
|
|
'smslog' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/sms.log'),
|
|
'tap' => [App\Logging\SmsFormatter::class],
|
|
'level' => 'info',
|
|
'days' => 1,
|
|
],
|
|
'zhanxin' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/zhanxin.log'),
|
|
'level' => 'info',
|
|
'days' => 90,
|
|
],
|
|
|
|
],
|
|
|
|
];
|