定制 akshaykhale1992/console-logger 二次开发

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

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

akshaykhale1992/console-logger

Composer 安装命令:

composer require akshaykhale1992/console-logger

包简介

A simple logger for PHP which logs into Browser's console log instead of a File or a Database.

README 文档

README

scrutinizer build status scrutinizer version code

How it started ?

We all have been in situations where we wanted to step through the code by logging the variable details. Most of the time we simply do.

print_r($variable);die();

And I find this process tedious, stopping for a simple variable log. I wanted a simple console log just like Javascript which is my inspiration behind creating console logger.

It is similar console log, it follows PSR-3: Logger Interface standards so you don't have to learn anything new.

How to use it ?

  1. Install the Package using composer

    composer require akshaykhale1992/console-logger

  2. User the Logger

Sample Code:

<?php
include './vendor/autoload.php';
use consoleLogger\Logger;
(new Logger())->emergency("This is from Server Side");
(new Logger())->alert("This is from Server Side");
(new Logger())->critical("This is from Server Side");
(new Logger())->error("This is from Server Side");
(new Logger())->warning("This is from Server Side");
(new Logger())->notice("This is from Server Side");
(new Logger())->info("This is from Server Side");
(new Logger())->debug("This is from Server Side");
(new Logger())->group("'Group 1'");
(new Logger())->info("This is from a Group 1");
(new Logger())->info("This is from a Group 2");
(new Logger())->info("This is from a Group 3");
(new Logger())->groupEnd();
(new Logger())->info("This is from Server Side", ['this' => 'is', 'an' => 'Array']);
(new Logger())->info("This is from Server Side", ['this', 'is', 'a', 'simple', 'Array']);

To-DO

  • Adding Test cases.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固