yii2-dingtalk-exception 日志自动推送到钉钉 [ 2.0 版本 ]
yii2-dingtalk-exception
说明
yii2 日志自动发送到钉钉 实时监控服务是否运行正常
安装
composer require saviorlv/yii2-dingtalk-exception
配置
在使用本扩展之前,你需要去 群机器人 获取相关信息。
使用
在config/main.php配置文件中定义component配置信息
'components' => [
......
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
[
'class' => 'Saviorlv\Log\ExceptionTarget',
'levels' => ['error', 'warning'],
'options' => [
'accessToken' => 'xxxxxxxx',
'isAtAll' => false,
'atMobiles' => ['136xxxx5134']
],
],
],
],
......
]
参数
'isAtAll' => true
@所有人
'atMobiles' => ['136xxxx5134','136xxxx5133']
@部分人员
saviorLv 上海
注册时间:2015-09-17
最后登录:2024-04-23
在线时长:97小时56分
最后登录:2024-04-23
在线时长:97小时56分
- 粉丝30
- 金钱14410
- 威望120
- 积分16580
共 2 条评论
依赖yii2组件 https://www.yiichina.com/extension/1799
Problem 1
- saviorlv/yii2-dingtalk[dev-master, 0.0.1, ..., 0.0.2] require guzzlehttp/guzzle ^6.3 -> found guzzlehttp/guzzle[6.3.0, ..., 6.5.x-dev] but the package is fixed to
7.1.x-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- saviorlv/yii2-dingtalk-exception dev-master requires saviorlv/yii2-dingtalk @dev -> satisfiable by saviorlv/yii2-dingtalk[dev-master, 0.0.1, 0.0.2]. - Root composer.json requires saviorlv/yii2-dingtalk-exception dev-master -> satisfiable by saviorlv/yii2-dingtalk-exception[dev-master].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
哈哈哈,好久没上账号了,稍等我看看
你用的yii2 是哪个版本的
您删除composer.lock 执行 composer update 再试一下 或者提升php版本试一下 我刚刚在php7.4 yii2.0.42.1 测试正常的