承接 yiisoft/log-target-syslog 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yiisoft/log-target-syslog

Composer 安装命令:

composer require yiisoft/log-target-syslog

包简介

Yii Logging Library - Syslog Target

README 文档

README

Yii

Yii Logging Library - Syslog Target


Latest Stable Version Total Downloads Build status Scrutinizer Code Quality Code Coverage Mutation testing badge static analysis type-coverage

This package provides the Syslog target for the yiisoft/log library.

Requirements

  • PHP 8.0 or higher.

Installation

The package could be installed with Composer:

composer require yiisoft/log-target-syslog

General usage

Creating a target:

use Yiisoft\Log\Target\Syslog\SyslogTarget;

$syslogTarget = new SyslogTarget($identity, $options, $facility, $levels);
  • $identity (string) - The openlog() identity.
  • $options (int) - The openlog() options. Defaults to LOG_ODELAY | LOG_PID.
  • $facility (int) - The openlog() facility. Defaults to LOG_USER.
  • $levels (array) - The log message levels that this target is interested in. Defaults to [] (all levels).

For example, to log only errors and warnings:

$syslogTarget = new SyslogTarget(
    'app',
    LOG_ODELAY | LOG_PID,
    LOG_USER,
    [LogLevel::ERROR, LogLevel::WARNING]
);

For more information about $identity, $options, and $facility, see the description of the openlog() function.

Creating a logger:

$logger = new \Yiisoft\Log\Logger([$syslogTarget]);

For use in the Yii framework, see the configuration files:

Documentation

For a description of using the logger, see the yiisoft/log package.

If you need help or have a question, the Yii Forum is a good place for that. You may also check out other Yii Community Resources.

License

The Yii Logging Library - Syslog Target is free software. It is released under the terms of the BSD License. Please see LICENSE for more information.

Maintained by Yii Software.

Support the project

Open Collective

Follow updates

Official website Twitter Telegram Facebook Slack

统计信息

  • 总下载量: 141
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 2
  • 依赖项目数: 1
  • 推荐数: 1

GitHub 信息

  • Stars: 10
  • Watchers: 12
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2019-04-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固