Download the PHP package kitloong/laravel-app-logger without Composer

On this page you can find all versions of the php package kitloong/laravel-app-logger. 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 laravel-app-logger

Laravel Application Logger

Run tests Latest Stable Version License

This package provides middleware that generates HTTP request and performance logs from incoming requests.

This package also provides a Database query log to log all executed queries in your application.

Installation

Usage

To start using HTTP request and performance logger please add the package's middleware in your app/Http/Kernel.php or routes.

No code modification needed to use the Database query log, you only need to enable it through .env.

By default, HTTP request and performance are enabled while the query log is disabled.

However, you could change each setting respectively to a different environment.

Log format

Http request log

Performance log

Query log

What's more

This package uses https://github.com/spatie/laravel-http-logger as the base for the HTTP request log, as well as the code design pattern.

It is common to receive tons of incoming requests in a real-life production application.

To ease for analysis, a unique string is embedded into HTTP request and performance log to indicate both log entries are related.

If you found any high memory usage or slow requests you could easily grep request log by the unique string for more information.

Configuration

You could also publish the config file to change more configuration or even use your own implementation:

You could check the content of the config file here.

Config: Logging channel

By default, Laravel App Logger writes logs into your default logging channel.

However, you may implement a new logging channel in Laravel config/logging.php, and overwrite the channel in the published config file.

An example is written for a better explanation.

In Laravel config/logging.php:

In config/app-logger.php:

Config: Implement own logger

You could even write your own logger implementation and overwrite it in the config file.

Here is the code snippet of HTTP request:

You could find a similar configuration in the performance and query section.

When you write your own log_profile, you must implement each loggers' own LogProfile interface.

Logger Interface
http \KitLoong\AppLogger\HttpLog\HttpLogProfile
performance \KitLoong\AppLogger\PerformanceLog\PerformanceLogProfile
query \KitLoong\AppLogger\QueryLog\QueryLogProfile

The interface requires shouldLog implementation. This is where you place your log condition.

When you write your own log_writer, you must implement each loggers' own LogWriter interface.

Logger Interface
http \KitLoong\AppLogger\HttpLog\HttpLogWriter
performance \KitLoong\AppLogger\PerformanceLog\PerformanceLogWriter
query \KitLoong\AppLogger\QueryLog\QueryLogWriter

The interface requires log implementation. This is where you define your log body message.

License

The Laravel Application Logger is open-sourced software licensed under the MIT license


All versions of laravel-app-logger with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.3
illuminate/support Version ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
spatie/laravel-http-logger Version ^1.0
ext-json Version *
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 kitloong/laravel-app-logger contains the following files

Loading the files please wait ....