PHPackages                             teachiq/laravel-command-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. teachiq/laravel-command-logger

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

teachiq/laravel-command-logger
==============================

Log commands with their execution time

v2.0.1(5y ago)11.2k2MITPHPPHP ^7.3|^8.0

Since Jun 7Pushed 4y agoCompare

[ Source](https://github.com/Teachiq/laravel-command-logger)[ Packagist](https://packagist.org/packages/teachiq/laravel-command-logger)[ Docs](https://github.com/teachiq/laravel-command-logger)[ RSS](/packages/teachiq-laravel-command-logger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (4)Versions (7)Used By (0)

Deprecation notice
==================

[](#deprecation-notice)

We are no longer using this package in favor of  and Oh Dear ().

Log commands with their execution time
======================================

[](#log-commands-with-their-execution-time)

[![Latest Version on Packagist](https://camo.githubusercontent.com/24f5384d0edebce2d8319161edae57480b9e589755ff082e2105912b0ed2f158/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746561636869712f6c61726176656c2d636f6d6d616e642d6c6f676765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/teachiq/laravel-command-logger)

Log the start and finish of all commands, along with their execution time. This is especially useful to detect if scheduled commands (for instance every night) run for longer than expected.

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

[](#installation)

You can install the package via composer:

```
composer require teachiq/laravel-command-logger
```

Usage
-----

[](#usage)

The package auto-registers. The log is saved by default to `storage/logs/command.log`.

```
[2020-06-07 10:30:14] environment.DEBUG: Starting route:list at 2020-06-07 10:30:14
[2020-06-07 10:30:14] environment.DEBUG: Finished route:list at 2020-06-07 10:30:14 (0.34346413612366 seconds)
[2020-06-07 10:36:25] environment.DEBUG: Starting exam:move-teacher at 2020-06-09 07:36:25
[2020-06-07 10:36:25] environment.DEBUG: __SLOW__ Finished exam:move-teacher at 2020-06-09 07:36:25 (18.763263940811 seconds)

```

You can configure the pagage by overriding the values in `config/command-log.php` if you want. The default values are the following:

```
