update:更新服务监控配置至模块内
This commit is contained in:
parent
45712076d2
commit
a3db671328
@ -15,6 +15,18 @@ use catcher\ModuleService;
|
|||||||
|
|
||||||
class MonitorService extends ModuleService
|
class MonitorService extends ModuleService
|
||||||
{
|
{
|
||||||
|
public function register()
|
||||||
|
{
|
||||||
|
parent::register(); // TODO: Change the autogenerated stub
|
||||||
|
|
||||||
|
$this->registerConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function registerConfig()
|
||||||
|
{
|
||||||
|
$this->app->config->set(array_merge($this->app->config->get('catch'),
|
||||||
|
require __DIR__ . DIRECTORY_SEPARATOR . 'config.php'), 'catch');
|
||||||
|
}
|
||||||
public function loadRouteFrom()
|
public function loadRouteFrom()
|
||||||
{
|
{
|
||||||
// TODO: Implement loadRouteFrom() method.
|
// TODO: Implement loadRouteFrom() method.
|
||||||
|
59
catch/monitor/config.php
Normal file
59
catch/monitor/config.php
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | CatchAdmin [Just Like ~ ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Copyright (c) 2017~2020 http://catchadmin.com All rights reserved.
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Author: JaguarJack [ njphper@gmail.com ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
return [
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 定时任务配置
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
'crontab' => [
|
||||||
|
/**
|
||||||
|
* 存储目录
|
||||||
|
*/
|
||||||
|
'store_path' => runtime_path('catch/crontab'),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主进程 pid 存储
|
||||||
|
*/
|
||||||
|
'master_pid_file' => runtime_path('catch/crontab') . 'master.pid',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日志配置
|
||||||
|
*/
|
||||||
|
'log' => [
|
||||||
|
// 日志记录方式
|
||||||
|
'type' => 'File',
|
||||||
|
// 日志保存目录
|
||||||
|
'path' => runtime_path('catch/schedule'),
|
||||||
|
// 单文件日志写入
|
||||||
|
'single' => false,
|
||||||
|
// 独立日志级别
|
||||||
|
'apart_level' => [],
|
||||||
|
// 最大日志文件数量
|
||||||
|
'max_files' => 0,
|
||||||
|
// 使用JSON格式记录
|
||||||
|
'json' => false,
|
||||||
|
// 日志处理
|
||||||
|
'processor' => null,
|
||||||
|
// 关闭通道日志写入
|
||||||
|
'close' => false,
|
||||||
|
// 日志输出格式化
|
||||||
|
'format' => '[%s][%s] %s',
|
||||||
|
// 是否实时写入
|
||||||
|
'realtime_write' => false,
|
||||||
|
],
|
||||||
|
|
||||||
|
/**
|
||||||
|
* crontab 任务命名空间
|
||||||
|
*/
|
||||||
|
'task_namespace' => '\\app\\task\\',
|
||||||
|
],
|
||||||
|
];
|
@ -76,52 +76,4 @@ return [
|
|||||||
'image' => 'fileSize:' . 1024 * 1024 * 5 . '|fileExt:jpg,png,gif,jpeg',
|
'image' => 'fileSize:' . 1024 * 1024 * 5 . '|fileExt:jpg,png,gif,jpeg',
|
||||||
'file' => 'fileSize:' . 1024 * 1024 * 10 . '|fileExt:txt,pdf,xlsx,xls,html,mp4,mp3,amr'
|
'file' => 'fileSize:' . 1024 * 1024 * 10 . '|fileExt:txt,pdf,xlsx,xls,html,mp4,mp3,amr'
|
||||||
],
|
],
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 定时任务配置
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
'crontab' => [
|
|
||||||
/**
|
|
||||||
* 存储目录
|
|
||||||
*/
|
|
||||||
'store_path' => runtime_path('catch/crontab'),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主进程 pid 存储
|
|
||||||
*/
|
|
||||||
'master_pid_file' => runtime_path('catch/crontab') . 'master.pid',
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日志配置
|
|
||||||
*/
|
|
||||||
'log' => [
|
|
||||||
// 日志记录方式
|
|
||||||
'type' => 'File',
|
|
||||||
// 日志保存目录
|
|
||||||
'path' => runtime_path('catch/schedule'),
|
|
||||||
// 单文件日志写入
|
|
||||||
'single' => false,
|
|
||||||
// 独立日志级别
|
|
||||||
'apart_level' => [],
|
|
||||||
// 最大日志文件数量
|
|
||||||
'max_files' => 0,
|
|
||||||
// 使用JSON格式记录
|
|
||||||
'json' => false,
|
|
||||||
// 日志处理
|
|
||||||
'processor' => null,
|
|
||||||
// 关闭通道日志写入
|
|
||||||
'close' => false,
|
|
||||||
// 日志输出格式化
|
|
||||||
'format' => '[%s][%s] %s',
|
|
||||||
// 是否实时写入
|
|
||||||
'realtime_write' => false,
|
|
||||||
],
|
|
||||||
|
|
||||||
/**
|
|
||||||
* crontab 任务命名空间
|
|
||||||
*/
|
|
||||||
'task_namespace' => '',
|
|
||||||
],
|
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user