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

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

confetticode/laravel-log
========================

Integrate multi log channels with Laravel

v0.2.0(2y ago)034MITPHPPHP ^8.0

Since Aug 6Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/confetticode/laravel-log)[ Packagist](https://packagist.org/packages/confetticode/laravel-log)[ Docs](https://github.com/confetticode/laravel-logging)[ RSS](/packages/confetticode-laravel-log/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Laravel Log
===========

[](#laravel-log)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7e709be541c17ef5c1e3b4960d2a51301547cb9b0f6fdd09f386d7af40e63566/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6e6665747469636f64652f6c61726176656c2d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/confetticode/laravel-log)[![Tests](https://camo.githubusercontent.com/b0fddb5f66f8616d8d95b1e4a2f493e22fc9f7ed49c44dd3364c25adfc572406/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f636f6e6665747469636f64652f6c61726176656c2d6c6f672f74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/confetticode/laravel-log/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/4378e9569a29f9c4e4faad6a1ac27a0316cf5026f8d6996e7bceebb05c3574c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6e6665747469636f64652f6c61726176656c2d6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/confetticode/laravel-log)

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

[](#installation)

You can install the package via composer:

```
composer require confetticode/laravel-log
```

Usage
-----

[](#usage)

Configure your environment variables:

```
LOG_MAIL_DRIVER=smtp
LOG_MAIL_LEVEL=error
LOG_MAIL_FROM=internal@confetticode.com
LOG_MAIL_TO=devops@confetticode.com

LOG_TELEGRAM_LEVEL=error
LOG_TELEGRAM_API_KEY=1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
LOG_TELEGRAM_CHAT_ID="@channel_or_group_id"
```

Send a log entry to mail or telegram:

```
# Sending a log entry via mail.
Log::channel('mail')->error('Test mail log channel.');

# Sending a log entry via telegram.
Log::channel('telegram')->error('Test telegram log channel.');
```

You may want to update the `config/logging.php` to push telegram and mail channels in the stack:

```
