带有PHP后端的日志记录套件? [英] Logging suite with back-end for PHP?

查看:75
本文介绍了带有PHP后端的日志记录套件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道用于PHP应用程序的通用日志记录套件吗?

Does anybody know an all-purpose logging suite for PHP applications?

套件"是指轻量级的日志记录功能库,以及用于查看它们的成熟后端.

By "suite" I mean a lightweight library of logging functions as well as a mature back-end to view them.

后端必须是可配置的,并使用类似功能来显示日志条目

The back-end would have to be configurable and show log entries using functions like

  • 按日期过滤

  • Filter by date

按事件过滤(警告,错误,自定义事件)

Filter by event (Warning, error, custom event)

按类别过滤

按用户过滤

按关联的数据库记录过滤(可选,我可以自己添加)

Filter by associated database record (optional, I could add that myself)

我想使用诸如日志"之类的引擎来存储我的应用内的数据库记录-例如

I would like to use such an engine as a "log book" for database records inside my app - e.g. as a diary for a vehicle record, detailing events like "phone call", "buyer interest", "accident", "repair", "theft/damage"....)

必须通过PHP库导出日志事件(以在应用程序中显示事件日志). RSS/XML导出也很好.

The possibility to export log events through the PHP library (to show an event log within the app) is mandatory. RSS / XML export would also be nice.

我现在正在应用程序内部自己执行此操作.我从来没有见过这样的东西,所以我意识到这是一个漫长的过程,但是我很想知道对于这个非常常见的任务是否有任何第三方解决方案.

I'm doing this myself at the moment inside the application. I've never seen anything like this so I realize it's a long shot, but I'm curious to seewhether there is any third party solution to this very common task.

推荐答案

查看 Apache的log4php 满足您的需求:

Log4php是PHP的日志记录框架 在Apache软件基金会 (ASF),由Apache Logging赞助 服务项目.

Log4php is logging framework for PHP at the Apache Software Foundation (ASF), sponsored by the Apache Logging Services project.

Log4PHP已完成毕业于 2010年3月.

Log4PHP has completed graduation in March 2010.

log4php支持:

log4php supports:

  • 通过xml和属性文件进行配置(结构与 log4j).
  • 文件,RollingFile,DailyFile,Echo,控制台,邮件,PDO,PHP错误, Syslog或NT事件和套接字 附录.
  • 简单,TTCC,样式,HTML和Xml布局.
  • 嵌套(NDC)和映射(MDC)诊断上下文.
  • Configuration through xml and properties file (same structure as log4j).
  • File, RollingFile, DailyFile, Echo, Console, Mail, PDO, PHP error, Syslog or NT events and Socket appenders.
  • Simple, TTCC, Pattern, Html and Xml Layouts.
  • Nested (NDC) and Mapped (MDC) Diagnostic Contexts.

这篇关于带有PHP后端的日志记录套件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆