There is no license information available for the latest version (1.0.1) of this package.

Library for context logging for Laravel

1.0.1 2019-12-20 12:38 UTC

This package is auto-updated.

Last update: 2020-12-20 15:09:51 UTC


Latest Version on Packagist Software License Build Status Coverage Status

Context Logging library for Laravel

Helper library for standard setup of czim/laravel-json-context-logging.

This helps you to quickly create context channels for logging. It is not a requirement for using JSON context logging.

Version Compatibility

Laravel Package
6.0 and up 1.0


No installation required; however, classes must be bound manually in your service provider.


use Czim\LaravelContextLogging\Config\StandardJsonContextConfigSource;
use Czim\LaravelContextLogging\Contracts\ContextLoggerFactoryInterface;
use Czim\LaravelContextLogging\Contracts\DebugEventLogPrepperInterface;
use Czim\LaravelContextLogging\Factories\ContextLoggerFactory;

class AppServiceProvider extends \Illuminate\Support\ServiceProvider
    // ...

    public function register(): void

            function () {
                $factory = new ContextLoggerFactory();
                return $factory;

    protected function makeLogContextConfigArray(): array
        return $this->app->make(StandardJsonContextConfigSource::class)

You will also have to set up your own event, which may extend Czim\LaravelContextLogging\Events\AbstractDebugEvent. The listener for that event should use the ContextLoggerFactoryInterface to make a logger, and the DebugEventLogPrepperInterface to render the event into loggable data to be logged by it.



The MIT License (MIT). Please see License File for more information.