lushobarlett/cologger 问题修复 & 功能扩展

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

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

lushobarlett/cologger

Composer 安装命令:

composer require lushobarlett/cologger

包简介

simple logger

README 文档

README

Very simple PHP Logger with colors

Use

By default the logger will output to a file in the directory that the file resides in with the name 'cologger.log'.

This (and console output) can be changed.

The class uses Linux console text modifiers ( \e[...m ), this has not been tested on Windows.

Notice: to write to a file, the process trying to do it needs to have file creation and file writing permissions.

Functions

$logger = new Logger;

$logger->error("error");
$logger->warning("warning");
$logger->notice("notice");
$logger->log("normal");

Errors will be red, Warnings will be orange, Notices will be green and Logs will be white. Each log will be placed in a new line with data about the date and time of logging.

Parameters

The first parameter is a string representing the location of the file. The second argument is a boolean, defaulted to false, to write to console instead.

$logger = new Logger("mytarget.log");

$console = new Logger("doesn't matter", true);

Future Features

  • Formatting the log metadata.
  • Changing the color scheme.
  • Adding color to the message itself (without doing it by hand)
  • Quick and better way to change logging targets

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固