Download the PHP package consilience/laravel-extended-logging without Composer

On this page you can find all versions of the php package consilience/laravel-extended-logging. 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-extended-logging

Latest Stable Version Total Downloads Latest Unstable Version License

Laravel Extended Logging

Provide some ready-made logging extensions to make it easier to deploy Laravel into multiple containers.

The main features are:

The features applied to the logging here are lightweight, opinionated, mainly non-configurable, and are what we have found to be very useful for our own projects. We are happy to accept PRs for additional features, though with the consideration that this package is not intended to be "all singing, all dancing", but rather a quick and easy install that gets an application logging container-ready with minimal effort.

Installation

For Laravel:

php composer require consilience/laravel-extended-logging

Lumen requires the provider to be registered in bootstrap/app.php so that the package can keep track of the name of the job currently running:

$app->register(Consilience\Laravel\ExtendedLogging\LoggingServiceProvider::class);

Configuration

The main configuration happens through the Laravel config/logging.php configuration script, by adding a channel.

A more compact version of the config entry, to go into the channels section of config/logging.php:

Then set LOG_CHANNEL=container when running in a container to send all logs to stderr. Other channels may be more suitable for other environments.

Additional options are available by publishing the config file (laravel-extended-logging.php) for the package:

php artisan vendor:publish --tag=laravel-extended-logging-config

Two options are supported at this time:

The list of processors, by default, will include the custom processors provided by this package, and a few of the processors that monolog provides. You can remove what you don't want, and add any others you may need.

If a processor accepts parameters, use this form:

Processor::class => [parameter1, parameter2, ...],

Only positional parameters are supported at this time.

The configuration file still accepts instantiated processor objects for legacy installs. You should change those to the uninstantiated Processor::class form to support configuration cacheing.

Configuration Upgrade

Since release 1.2.0 the processors to run have been located in the config file. You will need to publish the config file again to use the processors.

Example Usage

We run Laravel and Lumen applications in a Kubernetes/Docker environment, with all log entries being indexed by elastic search and presented by Kibana. This lumps all our logs from multiple applications, multiple pods and containers, and multiple jobs, into one big database.

To search and filter those log entries, it is vital for context information to be logged in a filterable way.

The PsrLogMessageProcessor, included in this log tap, makes it very easy to combine context data and log message construction. Logging looks like this as a result, with both a context array of data, and the log message with field replacements done:

The generated log message would look something like this, embedded into whatever you use to capture and wrap the log messages.

TODO


All versions of laravel-extended-logging with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0
monolog/monolog Version ^3.0
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 consilience/laravel-extended-logging contains the following files

Loading the files please wait ....