PHPackages                             smcrow/laravel-slack-log - 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. smcrow/laravel-slack-log

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

smcrow/laravel-slack-log
========================

Utilizes Laravel's notifications to provide logging to slack at various levels. Inspired by Log4j.

1.0.2(8y ago)93.8k2[1 issues](https://github.com/cr0wst/laravel-slack-log/issues)MITPHPPHP &gt;=7.0.0

Since Nov 5Pushed 8y ago1 watchersCompare

[ Source](https://github.com/cr0wst/laravel-slack-log)[ Packagist](https://packagist.org/packages/smcrow/laravel-slack-log)[ RSS](/packages/smcrow-laravel-slack-log/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (6)Versions (3)Used By (0)

Laravel Slack Log
=================

[](#laravel-slack-log)

[![Latest Stable Version](https://camo.githubusercontent.com/c3d0e046adde06f976941382469cff7fa8bbc3ca2372030967d98b69ba5b15a9/68747470733a2f2f706f7365722e707567782e6f72672f736d63726f772f6c61726176656c2d736c61636b2d6c6f672f762f737461626c65)](https://packagist.org/packages/smcrow/laravel-slack-log) [![Latest Unstable Version](https://camo.githubusercontent.com/9f0c4254d1bbb9c64144a605e17488fdc6c29364f11cc0d6f45cf0781b1a85f9/68747470733a2f2f706f7365722e707567782e6f72672f736d63726f772f6c61726176656c2d736c61636b2d6c6f672f762f756e737461626c65)](https://packagist.org/packages/smcrow/laravel-slack-log) [![Total Downloads](https://camo.githubusercontent.com/4f3ed29010c7dcf7339becf2c2f83dd336a71fd293f8dc92ecbe57cc5c5e8ab0/68747470733a2f2f706f7365722e707567782e6f72672f736d63726f772f6c61726176656c2d736c61636b2d6c6f672f646f776e6c6f616473)](https://packagist.org/packages/smcrow/laravel-slack-log) [![Build Status](https://camo.githubusercontent.com/b109f4f950e1e4c4d665ddae23aeb4866842fc1aa94913c179f1b93d0ec2fe8d/68747470733a2f2f7472617669732d63692e6f72672f6372307773742f6c61726176656c2d736c61636b2d6c6f672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/cr0wst/laravel-slack-log)

This package utilizes Laravel's native ability to create slack notifications to log at different log levels. This was inspired by Log4j.

Log Levels
----------

[](#log-levels)

There are several different log levels that can be used. The desired level of logging is defined in the config.

Here are some example uses of the different log levels:

- `ERROR` - Indicates that an error occured.
- `WARN` - Indicates that an error occured but it was recoverable.
- `INFO` - Informational message usually explaining something in a *business rule* sense.
- `TRACE` - Used for reporting where, in the code, the execution is taking place. Could report entering and leaving functions.
- `DEBUG` - Used for dumping the contents of a variable.

Each message is implemented in the same way. The log levels are for you, the developer, to decide how to use.

The configured log level is checked before the message is sent. Levels are inclusive in that a specific level will include all message levels above it. For example, `INFO` will include `INFO`, `WARN`, and `ERROR`.

In some cases, it can be non-trivial to generate the message string. Logging guards have been provided to assist with this.

Installation Steps
==================

[](#installation-steps)

Install Through Composer
------------------------

[](#install-through-composer)

```
composer require smcrow/laravel-slack-log

```

Register the Service Provider
-----------------------------

[](#register-the-service-provider)

### Laravel 5.5

[](#laravel-55)

Laravel 5.5 allows for the auto-discovery of service providers. The `SlackLogServiceProvider` will automatically be discovered.

### Pre Laravel 5.5

[](#pre-laravel-55)

You'll need to register the command in order for it to be usable. Modify the `register` method of `AppServiceProvider`:

```
public function register()
{
    $this->app->register(SlackLogServiceProvider::class);
}
```

Registering the Facade
----------------------

[](#registering-the-facade)

You can register the optional facade by adding the following to your `app.php` aliases:

```
'SlackLog' => \Smcrow\SlackLog\Facades\SlackLog::class
```

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

[](#configuration)

Use `php artisan vendor:publish` to create a new configuration file. The file will be `config/slack-log.php`.

In this file you will need to provide the webhook url. I recommend reading [Slack Incoming Webhooks](https://my.slack.com/services/new/incoming-webhook/) for more information on how to setup the webhook.

Example Usage
=============

[](#example-usage)

With logging guards and using the facade:

```
$user = ['name' => 'John', 'age' => 65];

if (SlackLog::isDebugEnabled()) {
    SlackLog::debug('User: ' . print_r($user, true));
}
```

Produces the following:

[![Debug Example](example.png)](example.png)

Feedback and Contributions
==========================

[](#feedback-and-contributions)

Please feel free to offer suggestions by submitting an Issue. Alternatively, submit a pull request with any features you wish to add. This is a work-in-progress, and I would welcome any and all feedback.

###  Health Score

31

—

LowBetter than 65% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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.

###  Release Activity

Cadence

Every ~35 days

Total

3

Last Release

3133d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea5b33763cd637d163c747f156ca164ee450bb0bd85d74886bbf8d7b8fe44876?d=identicon)[cr0wst](/maintainers/cr0wst)

---

Top Contributors

[![cr0wst](https://avatars.githubusercontent.com/u/8314724?v=4)](https://github.com/cr0wst "cr0wst (9 commits)")[![Humni](https://avatars.githubusercontent.com/u/5545538?v=4)](https://github.com/Humni "Humni (3 commits)")

---

Tags

laravelnotificationsslacklaravelloggingnotificationsslack

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/smcrow-laravel-slack-log/health.svg)

```
[![Health](https://phpackages.com/badges/smcrow-laravel-slack-log/health.svg)](https://phpackages.com/packages/smcrow-laravel-slack-log)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.9k3.8M1.1k](/packages/statamic-cms)[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.8M227](/packages/backpack-crud)[unopim/unopim

UnoPim Laravel PIM

10.8k2.5k](/packages/unopim-unopim)[bagisto/bagisto

Bagisto Laravel E-Commerce

28.0k175.2k9](/packages/bagisto-bagisto)[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

11.3k4.0k](/packages/leantime-leantime)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

793.9k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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