定制 hopex/simplog 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

hopex/simplog

最新稳定版本:2.3

Composer 安装命令:

composer require hopex/simplog

包简介

Simple data logging with customize directories.

README 文档

README

Package version Package version PHP version License

The library contains a simple class, and it's facade, for simple data and exception logging on JSON format.

Installing

composer require hopex/simplog

Documentation

Methods Description Example for usage
setWorkDirectory Specifies the root directory of the hierarchy of logging levels. It can take several directories in turn one after the other in the form of a standard path. setWorkDirectory('logging')
setWorkDirectory('logging/sub-folder')
setLevel Specifies the name of the directory where you want to save the logging file. It can't take several directories in turn one after the other in the form of a standard path. setLevel('requests')
setTimeZone Specifies the current timezone. setTimeZone('UTC')
setTimeZone('Europe/Amsterdam')
setDateFormat Sets the time format in the main key of one log element in the logging file. Will not be used if V is specified. setDateFormat('H:i:s')
setDateFormat('(Y) H:i:s')
setItemKey Sets the primary key of one log element in the logging file. In this case, the current time will not be indicated. setItemKey('custom-key')
setItemsLimit Sets the maximum number of elements in a single logging file. The value must be greater than zero. By default, 1000 keys. setItemsLimit(10)
setItemsLimit(5000)
setPermissions Sets access rights to the logging file. setLogFilePermissions(0755)
setLogFilePermissions(644)
setFileName Sets the name of the logging file. setFileName('my-requests-logs')
error Logging any object as an error message. Similarly as for custom.
warning Logging any object as a warning. Similarly as for custom.
info Logging of any object as an informational message. Similarly as for custom.
custom Logging of any object. custom(new SomeClass())
custom('Some message')
custom(['key' => 'value'])
exception Logging of the exception object with the possibility of adding additional keys. exception(new \Exceptions())
exception(new \Exceptions(), true)
exception(new \Exceptions(), false, ['key' => 'value'])
clearLevel The requirement to clear the directory where the logging file should be saved from other files. clearLevel()

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固