2017 © Pedro Peláez
 

library smartlogs

Create Smart Logs for Laravel 5 Web or API application.

image

santran/smartlogs

Create Smart Logs for Laravel 5 Web or API application.

  • Saturday, April 21, 2018
  • by santran
  • Repository
  • 0 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel 5 SmartLogs

Total Downloads Paypal Donate, (*1)

Log look like preview, (*2)


The best Log for Laravel 5.2.x and above. Install with composer., (*3)

Install (Laravel)

Install via composer, (*4)

composer require santran/smartlogs:dev-master

Add Service Provider to config/app.php in providers section, (*5)

SanTran\SmartLogs\SmartLogsServiceProvider::class,

Add Facade to config/app.php in aliases section:, (*6)

'SmartLogs' => SanTran\SmartLogs\SmartLogsFacade::class,

Publish config file, open console and enter bellow command:, (*7)

php artisan vendor:publish

Config file 'smartlogs.php' will be copy to config/smartlogs.php, you can change any config on that file for SmartLogs, (*8)

- 'log_path'                          : Path to save file log
- 'log'                               : Log daily or single file
- 'log_option_on'                     : Enable/Disable Option Log
- 'log_level_enable'                  : Level of logs (Have four Level 'DEBUG', 'INFO', 'WARNING', 'ERROR')
- 'log_file_name'                     : Name of file log
- 'log_condition' => true,            : Enable Log by user id or client IP
- 'list_user_id' => [1, 2]            : List user id accept to write log
- 'list_ip' => ['127.0.0.1', '::1']   : List IP accept to write log
- 'log_reverse' => false,             : Reverse condition write lo by user id and client ip

How to use ? Open your Controller or any where you want to write log. Add this line on above file, remember after 'namespace ...' keywork:, (*9)

use SmartLogs;

Call to write log on your function:, (*10)

SmartLogs::startLog($params)  : To write START log ($params is optional - Default is "START")

SmartLogs::finishLog($params)  : To write FINISH log ($params is optional - Default is "FINISH")

SmartLogs::appInfo($params)  : To write Information log ($params can be String or Array)

SmartLogs::appDebug($params)  : To write Debug log ($params can be String or Array)

SmartLogs::appWarning($params)  : To write Warning log ($params can be String or Array)

SmartLogs::appError($params)  : To write Error log ($params can be String or Array)

SmartLogs::optLog($params)  : To write Option log ($params can be String or Array)

SmartLogs::logRequest()     : To write Option log with all Request params

Features: - Update auto log lastest sql command - And more..., (*11)

The Versions

21/04 2018

dev-master

9999999-dev

Create Smart Logs for Laravel 5 Web or API application.

  Sources   Download

MIT

The Requires

 

by San Tran

18/11 2016

1.0

1.0.0.0

Create Smart Logs for Laravel 5 Web or API application.

  Sources   Download

MIT

The Requires

 

by San Tran