marchie/ms-application-insights-monolog 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

marchie/ms-application-insights-monolog

Composer 安装命令:

composer require marchie/ms-application-insights-monolog

包简介

Microsoft Application Insights integration for monolog. An abstract handler that sends messages to Microsoft Application Insights

README 文档

README

Monolog Handler connection to Microsoft Application Insights

Installation

Via Composer: Add the following to your composer.json:

  "require": {
        "marchie/ms-application-insights-monolog": "dev-master"
    }

Usage

A handler is provided that wraps up a Microsoft Application Insights Telemetry client. By default the handler will grab anything at Logger::ERROR and above and send it to Microsoft Application Insights.

$logger  = new Monolog\Logger("Example");

$telemetryClient = new \ApplicationInsights\Telemetry_Client();
$telemetryClient->getContext()->setInstrumentationKey('YOUR INSTRUMENTATION KEY');

$msApplicationInsightsHandler = new \Marchie\MSApplicationInsightsMonolog\MSApplicationInsightsHandler($telemetryClient);

$logger->pushHandler($msApplicationInsightsHandler);

// The following error will get sent automatically to Microsoft Application Insights
$logger->addError("oh no!", array('exception' => new \Exception("ohnoception")));

Credits

This package is based on the MonoSnag package. Thanks to Steve Brazier and other contributors to that package.

The package also relies on Microsoft's ApplicationInsights-PHP package.

统计信息

  • 总下载量: 1.53k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固