承接 ofix/panda-log 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ofix/panda-log

Composer 安装命令:

composer require ofix/panda-log

包简介

panda-log is a yii2-extension for log and view debug information

README 文档

README

Panda Log Document

Panda-log is a debugger tool for flushing log data to binary file. For each Http/Https Request, the bussiness code lines may distribute in different files and different functions. panda-log would track all the code execution stream in one request. No matter you call Panda::log in which function, you must call Panda::flush once before sending response data to client, and only at this time all the log records generated by calling Panda::log would be populated and be flushed to binary file at once. Panda-log depends on Yii2 framework, it's lightweight, and easy-to-use. Just enjoy your debug journey.

Panda-log Screen Shot

PHP code example

View debug information in browser

Install panda-log via composer

composer require ofix/panda-log

Config panda-log as a module in Yii2 framework

  'bootstrap' => ['panda-log'],
  $config['modules']['panda-log'] = [
      'class' => ofix\PandaLog\Module::class,
      'log_dir'=> '@backend/runtime/panda-log/', // log_dir is the directory panda-log files located on
  ];

How to use panda-log in PHP

 // log string
 $str = "test for string";
 Panda::log("str",$str);
 // log sql
 $sql = (new Query())->select("some_table")->where(["id"=>4032]);
 Panda::log("sql",$sql);
 // log number
 $num = 323;
 Panda::log("num",$num);
 // log object
 $student = new \stdClass();
 $student->name = "tom";
 $student->age = 28;
 Panda::log("student",$student);
 // log array
 $arr = ["id"=>3223,"mobile"=>13993434];
 Panda::log("arr",$arr);
 
 //flush all above records to log file please call following code,otherwise it would not save in files.
 Panda::flush();

View panda-log data in browser

With the above configuration, you will be able to access panda-log in your browser using the URL http://localhost/path/to/index.php?r=panda-log

If your application enables [[\yii\web\UrlManager::enablePrettyUrl|pretty URLs]], you can then access panda-log via URL: http://localhost/path/to/index.php/panda-log

Support or Contact

Having trouble with panda-log usage? contact me with QQ|WeChat 981326632 or send email to 981326632@qq.com

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-04-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固