PHPackages                             rlacerda83/laravel-dynamic-logger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. rlacerda83/laravel-dynamic-logger

ActiveLibrary

rlacerda83/laravel-dynamic-logger
=================================

Dynamic logger for laravel

047PHP

Since Jul 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/rlacerda83/laravel-dynamic-logger)[ Packagist](https://packagist.org/packages/rlacerda83/laravel-dynamic-logger)[ RSS](/packages/rlacerda83-laravel-dynamic-logger/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Dynamic Log settings for Laravel
================================

[](#dynamic-log-settings-for-laravel)

With this package you will be able to change log settings in real time.

Requirements
------------

[](#requirements)

Laravel 5.

Installation
------------

[](#installation)

You can install the package using the [Composer](https://getcomposer.org/) package manager. You can install it by running this command in your project root:

```
composer require rlacerda83/laravel-dynamic-logger
```

Configuration
-------------

[](#configuration)

Add the `DynamicLogger\DynamicLoggerServiceProvider` provider to the `providers` array in `config/app.php`:

```
'providers' => [
  DynamicLogger\DynamicLoggerServiceProvider::class,
],
```

Then add the facade to your `aliases` array:

```
'aliases' => [
  ...
  'DynamicLogger' => DynamicLogger\Facades\DynamicLogger::class,
],
```

Usage
-----

[](#usage)

The DynamicLogger facade is now your interface to the library.

Note that if you're using the facade in a namespace (e.g. `App\Http\Controllers` in Laravel 5) you'll need to either `use DynamicLogger` at the top of your class to import it, or append a backslash to access the root namespace directly when calling methods, e.g. `\DynamicLogger::method()`.

```
/**
 * Use setHandlers to modify the log settings
 *
 * @param array $handlers - array handlers (monolog)
 * @param bool $logOnlyThisHandlers - If true, it ignores the default handler of laravel and uses only the handlers sent
 * @param bool $cliLogger - future improvement
 */

$file = 'path_to_log/file.log'
$handlers[] = new StreamHandler($file);
\DynamicLogger::setHandlers($handlers, true, $cliLogger);
//From that moment, the log will only be used with informed handlers

//to revert the log for default laravel settings use:
\DynamicLogger::revert();

// you can use Log::info() or you can use DynamicLogger::info()
/**
 * All log methods in DynamicLogger accept this params
 *
 * @param string $message
 * @param array $params
 * @param array $context
 */

 //Both have the same behavior
Log::info('Info message');
DynamicLogger::info('Info Message');

// DynamicLogger with params
DynamicLogger::info(
  'Event %s has been successfully started. Next event will be the %s', [$currentEvent, $nextEvent]);
```

###  Health Score

21

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/562854acd689b4b1cae6ede66584d5c8143aae5f1d4c5657944ff4568e2d8576?d=identicon)[rlacerda83](/maintainers/rlacerda83)

---

Top Contributors

[![rlacerda83](https://avatars.githubusercontent.com/u/9198556?v=4)](https://github.com/rlacerda83 "rlacerda83 (6 commits)")

### Embed Badge

![Health badge](/badges/rlacerda83-laravel-dynamic-logger/health.svg)

```
[![Health](https://phpackages.com/badges/rlacerda83-laravel-dynamic-logger/health.svg)](https://phpackages.com/packages/rlacerda83-laravel-dynamic-logger)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
