Download the PHP package bkstar123/log-enhancer without Composer

On this page you can find all versions of the php package bkstar123/log-enhancer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package log-enhancer

log-enhancer

1.Requirements

It is recommended to install this package with PHP version 7.1.3+ and Laravel Framework version 5.6+

2.Installation

composer require bkstar123/log-enhancer 

3.Usage

By default, the package will use a custom channel named as bkstar123_log_enhancer and write log messages to a file named as laravel-bkstar123_log_enhancer-YYYY-MM-DD.log. The default log driver is daily and rotation period is 7 days.

You can customize the base name of log files and the rotation period by adding the following environment settings in .env file:

It is not necessary but you can also change the custom channel name with BKSTAR123_LOG_ENHANCER_CHANNEL setting in .env file

You can also write custom log messages to browser Javascript console with no browser extension required. Most browsers supporting console API are supported

To do so, just add the following environment setting in .env file:

To write a log message, call to log() method of DebugLog facade as follows:

Note: DebugLog alias is automatically registered, so you do not need to add it in the config/app.php

where $level can be (default to debug level)

Example:

Log messages are enhanced with the following data:

datetime (with the system timezone): date and time of log messages
channel: value of APP_ENV setting in .env file
level_name: value of $level
message: your custom log message
pid: the process ID of the PHP thread serving the current request
client_ip: the IP address of the client browser
url: request path
http_method: HTTP verb of the current request e.g: GET, POST ...
route_hanlder: the name of the request route handler i.e ControllerName/ActionName
session: the session data associated with the request

Sample log message:

[2019-06-08 11:08:43 UTC] [local.INFO]: Hello Antony Hoang
{'pid': '2873', 'client_ip': '192.168.1.35', 'url': '/', 'http_method': 'GET', 'route_handler': 'App\Http\Controllers\TestController@test', 
'session': {"_token":"aSKrQ8xXETX5Mywt3EoLMqTG6SfOA6M4Vc5yGyDC","_previous":{"url":"http://kpacks.acme.com"},"_flash":{"old":[],"new":[]}}}

All versions of log-enhancer with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bkstar123/log-enhancer contains the following files

Loading the files please wait ....