leowebguy/simple-logger 问题修复 & 功能扩展

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

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

leowebguy/simple-logger

最新稳定版本:2.0.0

Composer 安装命令:

composer require leowebguy/simple-logger

包简介

Collect brief exceptions and send daily reports

README 文档

README

Plugin for collecting exception handlers logs and reporting over email. A simple solution for those who can't or won't pay for corporate solution loggers like: New Relic, Dynatrace, Datadog and others.

If you don't receive daily emails, check:

  1. if your email setup is correct
  2. if simple logger plugin is active
  3. if you have exceptions older than a day in storage/logs/simplelogger.json

Install

composer require leowebguy/simple-logger && php craft plugin/install simple-logger

Usage

Set these two .env parameters to make sure Simple Logger is active

# Simple Logger
LOGGER_ON=1
LOGGER_EMAIL=john@email.com

LOGGER_EMAIL accept multiple emails LOGGER_EMAIL=john@email.com,jane@@email.com

The plugin will use the built-in craft event EVENT_BEFORE_HANDLE_EXCEPTION to handle exceptions, saving into a custom log file storage/logs/simplelogger.json

[
    {
        "time": "2023-01-21 17:37:21",
        "sourcetype": "Exception 400",
        "level_name": "ERROR",
        "message": "TwigErrorRuntimeError: Calling unknown method: craftwebtwigvariablesCraftVariable::deviceDetect1() in /var/www/html/templates/index.twig:10"
    }
]

Using the same event above, Simple Logger will once a day (after 8pm) collect the report and send an email to LOGGER_EMAIL defined recipient

report

Simple Logger won't collect NotFoundHttpException exceptions, mostly related to inexistent pages or resources

Feeling creative?

PR into https://github.com/leowebguy/simple-logger

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2023-01-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固