2017 © Pedro Peláez
 

yii2-extension panda-log

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

image

ofix/panda-log

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

  • Friday, July 20, 2018
  • by ofix
  • Repository
  • 1 Watchers
  • 1 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 30 % Grown

The README.md

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., (*1)

Panda-log Screen Shot, (*2)

PHP code example, (*3)

View debug information in browser, (*4)

Install panda-log via composer, (*5)

composer require ofix/panda-log

Config panda-log as a module in Yii2 framework, (*6)

  '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, (*7)

 // 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, (*8)

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, (*9)

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, (*10)

Support or Contact, (*11)

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

The Versions

20/07 2018

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

debug log logging yii2-extension panda-log

20/07 2018

1.5.0

1.5.0.0

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

  Sources   Download

MIT

The Requires

 

debug log logging yii2-extension panda-log

07/05 2018

1.4.0

1.4.0.0

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

  Sources   Download

MIT

The Requires

 

debug log logging yii2-extension panda-log

19/04 2018

1.3.0

1.3.0.0

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

  Sources   Download

MIT

The Requires

 

debug log logging yii2-extension panda-log

18/04 2018

1.2.0

1.2.0.0

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

  Sources   Download

MIT

The Requires

 

debug log logging yii2-extension panda-log

18/04 2018

1.1.0

1.1.0.0

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

  Sources   Download

MIT

The Requires

 

debug log logging yii2-extension panda-log

18/04 2018

1.0.0

1.0.0.0

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

  Sources   Download

MIT

The Requires

 

debug log logging yii2-extension panda-log