PHPackages                             samuelirwin/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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. samuelirwin/logger

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

samuelirwin/logger
==================

This is a wrapper package to create standard logging information for better debugging

012PHP

Since Dec 9Pushed 2y ago1 watchersCompare

[ Source](https://github.com/samuelirwin/logger)[ Packagist](https://packagist.org/packages/samuelirwin/logger)[ RSS](/packages/samuelirwin-logger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

This is a wrapper log to provide consistent log information during development
==============================================================================

[](#this-is-a-wrapper-log-to-provide-consistent-log-information-during-development)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e65cfc0f04d7dcc6de4231bace0329b382a809e37bba1bd37e2622e07fd467ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616d75656c697277696e2f6c6f676765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/samuelirwin/logger)[![Total Downloads](https://camo.githubusercontent.com/33f75593e608bb85cd8afec2ef9dd94982cf1e6c1e2f93f3a5104ed5c78dbfb2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616d75656c697277696e2f6c6f676765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/samuelirwin/logger)[![GitHub Actions](https://github.com/samuelirwin/logger/actions/workflows/main.yml/badge.svg)](https://github.com/samuelirwin/logger/actions/workflows/main.yml/badge.svg)

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

[](#installation)

You can install the package via composer:

```
composer require samuelirwin/logger
```

Usage
-----

[](#usage)

ParametersTypeDescription$classobjectRequired$methodstringRequired$logTypestringRequired$summarystringRequired$detailsarrayOptional```
Logger::record(object $class, string $method, string $logType, string $summary, array $details = [])
```

Example

```
You can use $this in a class to get the class object

class Foo {
    public function bar()
    {
        Logger::record(
            $this, // class object
            'bar', // name of the method
            'error', // log types; $allowedLogTypes = ['emergency', 'alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug'];
            'Summary of error message',
            [
                // inside here can be anything you want to log
                'detail-1' => 1,
                'detail-2' => 'new details',
                'details-3' => 'more details'
            ]);
    }
}
```

Result Output

```
{
    "context": "ClassName::methodName",
    "location": "/path/to/file",
    "details": {
        "id": 1,
        "code": 444,
        "message": "exception message"
    }
}
```

Allowed Log Typesemergencyalerterrorwarningnoticeinfodebug### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Samuel Irwin](https://github.com/samuelirwin)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 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/98c903bbbd048bf21f503bd89684fb14c5cb9729c815161dcddea21ac5b0b442?d=identicon)[samuelirwin](/maintainers/samuelirwin)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/samuelirwin-logger/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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