Download the PHP package mahmoud-mhamed/laravel-logman without Composer

On this page you can find all versions of the php package mahmoud-mhamed/laravel-logman. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-logman

PHP 8.1+ Laravel MIT License

Logman

Error reporting & log management for Laravel — automatic exception notifications with a powerful built-in log viewer, mute/throttle controls, and an analysis dashboard.


What it does

When an unhandled exception occurs in your Laravel app, Logman captures everything — the stack trace, the request, the authenticated user, recent database queries, queue job details — and sends a rich, formatted notification to your configured channel. All of this happens automatically, with zero code changes.

On top of that, Logman ships with a full-featured log viewer you can access from your browser to browse, search, filter, mute, throttle, and review your Laravel log files.


Features

Notifications

Log Viewer (/logman)

Request Logging


Requirements


Installation

Laravel auto-discovers the package. Then run the install command:

This will:

Use --force to overwrite an existing config file with the latest version.

Updating config after a package update

When Logman adds new config options in a new version, you can add them automatically:

This will compare your config/logman.php with the package default and insert any missing keys — with their default values, comments, and original formatting preserved. Your existing values stay untouched.

Flag Description
--force Overwrite the entire config file with the latest package default
--sync Add missing config keys with their defaults (preserves your existing values and formatting)

Quick Start

1. Pick a channel and configure it (see details below)

2. Test your setup

3. Open the Log Viewer

Navigate to /logman in your browser.


Configuration

Publish the config file:

To overwrite an existing config with the latest defaults:

To add missing config keys after a package update (preserves your existing values):

Publish the views (optional):

General Options

Option Default Description
enable_production true Send reports in production
enable_local false Send reports in local environment
auto_report_exceptions true Auto-register in exception handler
ignore [] Exception classes to skip (uses instanceof)
storage_path storage/logman Directory for mutes, throttles, rate limits data

Channel: Slack

Slack is enabled by default.

Setup:

  1. Go to https://api.slack.com/apps
  2. Click Create New App > From scratch
  3. Give it a name (e.g. "Exception Bot") and select your workspace
  4. In the left sidebar, click Incoming Webhooks
  5. Toggle Activate Incoming Webhooks to On
  6. Click Add New Webhook to Workspace
  7. Select the channel and click Allow
  8. Copy the Webhook URL

Add to .env:

If your app doesn't already define a slack logging channel, Logman creates one automatically using slack_channel_config in the config file.


Channel: Telegram

Setup:

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the prompts to create a bot
  3. Copy the Bot Token you receive
  4. Add the bot to your group/channel
  5. To get the Chat ID: send a message in the group, then open https://api.telegram.org/bot<TOKEN>/getUpdates and find the chat.id value

Add to .env:

Enable in config/logman.php:


Channel: Discord

Setup:

  1. Open your Discord server and go to Server Settings > Integrations
  2. Click Webhooks > New Webhook
  3. Choose a name and the channel to post to
  4. Click Copy Webhook URL

Add to .env:

Enable in config/logman.php:


Channel: Mail

Sends exception reports via email using Laravel's built-in mail system. Make sure your app's mail config (config/mail.php) is working first.

Add to .env:

Enable in config/logman.php:

Multiple recipients: use comma-separated emails in LOGMAN_MAIL_TO.


Per-Channel Options

Every channel supports these options:

Option Default Description
enabled varies Enable/disable the channel
auto_report_exceptions true Auto-report exceptions (false = manual send only)
daily_digest true Include this channel in the daily digest
min_level 'debug' Minimum log level (see levels below)
queue false Send notifications asynchronously via Laravel queues
retries 0 Number of retry attempts on failure
throttle 0 Per-channel cooldown in seconds (0 = no per-channel throttle)

Available log levels (from lowest to highest severity):

Setting min_level to error means only error, critical, alert, and emergency will be reported to that channel. Setting it to debug reports everything.

Example — Slack gets everything sync, Mail only gets critical errors async:


Rate Limiting & Throttling

Logman uses two levels of protection to prevent notification flooding:

Level 1: Global Rate Limit

Runs first, before any channel is contacted. If the same exception (same class + file + line) fires again within the cooldown window, it is blocked for all channels at once. This is the fast, cheap check that prevents unnecessary work.

Option Default Description
rate_limit.enabled true Enable global rate limiting
rate_limit.cooldown_seconds 10 Seconds before the same exception can be re-reported to any channel

When an error is re-sent after being rate-limited, the notification includes:

This error was suppressed 5 time(s) since last report (rate limited).

Level 2: Per-Channel Throttle

Runs second, independently for each channel. This lets you set different cooldowns per channel — for example, send to Slack every second but limit emails to once per minute.

Channel Default Description
channels.slack.throttle 1 Slack cooldown in seconds
channels.telegram.throttle 10 Telegram cooldown in seconds
channels.discord.throttle 10 Discord cooldown in seconds
channels.mail.throttle 60 Mail cooldown in seconds

How They Work Together

Both checks are lightweight (file read / cache lookup) and much faster than the actual HTTP request or email send they prevent. Keeping both levels gives you coarse global protection plus fine-grained per-channel control.

Log Viewer Options

Option Default Description
log_viewer.enabled true Enable/disable log viewer routes
log_viewer.route_prefix 'logman' URL prefix
log_viewer.middleware ['web'] Route middleware
log_viewer.storage_path storage/logs Log files directory
log_viewer.pattern '*.log' File glob pattern
log_viewer.max_file_size 50 MB Max file size to display
log_viewer.per_page 25 Entries per page
log_viewer.per_page_options [15,25,50,100] Available per-page options

Request Logging

Log every incoming HTTP request to a dedicated log file that shows up in the Log Viewer. Disabled by default — enable it with the config flag or LOGMAN_REQUEST_LOGGING=true.

Option Default Description
request_logging.enabled false Master switch for request logging
request_logging.channel 'logman_requests' Logging channel (auto-created via request_channel_config)
request_logging.level 'info' Log level for request entries
request_logging.log_query true Log query string parameters
request_logging.log_body true Log request body (sensitive fields masked)
request_logging.log_headers true Log a curated set of request headers
request_logging.log_response_status true Include the HTTP response status
request_logging.log_response_body false Include the response body (masked; JSON decoded)
request_logging.middleware 'global' Where to attach: 'global', a group name, or a list of groups
request_logging.methods [] Only log these methods (empty = all) — env LOGMAN_REQUEST_METHODS
request_logging.only [] Path allowlist — only log paths matching these patterns (* wildcards); env LOGMAN_REQUEST_ONLY
request_logging.only_containing [] URL substring allowlist — only log URLs containing these strings; env LOGMAN_REQUEST_ONLY_CONTAINING
request_logging.except asset/vendor patterns Skip paths matching these patterns (* wildcards)
request_logging.max_payload_length 8000 Truncate oversized payloads

Logman's own viewer routes are always excluded, so request logging never logs itself.

Filter which requests get logged, entirely from .env:

only and only_containing are allowlists: when either is set, a request is logged only if it matches at least one entry (the two are combined with OR). Leave both empty to log every request.

Log a request on demand

Want to log a single request from your own code — regardless of the config switches? Call the helper (or the facade) anywhere: it writes to the same logman_requests channel and bypasses the enabled flag and all skip/allowlist filters.

Each manual entry records the file and line it was called from (called_from), shown as a banner at the top of the log's detail view.

Open in your IDE: set LOGMAN_EDITOR and that called_from location becomes a clickable link that jumps straight to the source.

Viewing logs written on a server? Map the remote path to your local checkout in config/logman.php:


Pages

Route Description
/logman Browse, search, and filter log files
/logman/analysis Charts, statistics, today vs yesterday comparison
/logman/mutes Manage muted exceptions
/logman/throttles Manage throttled exceptions
/logman/grouped Deduplicated view of recurring errors
/logman/bookmarks Saved log entries
/logman/config View all package configuration
/logman/about Package info, features, commands

Usage

Automatic (default)

With auto_report_exceptions enabled (default), every unhandled exception is reported automatically. No code changes needed.

Manual Reporting

Ignoring Exceptions

Uses instanceof — ignoring a parent class also ignores all its subclasses.


Mute System

Temporarily silence specific exceptions from being reported. Available from the log viewer UI or the Mutes page.


Throttle System

Limit how many times an exception is reported per time period.

Example: allow max 5 reports per hour for a specific exception — after that, further occurrences are silently suppressed until the period resets.


What Gets Reported

Each notification includes:

Section Details
Exception Class, message, file, line, code, previous exception
Auth User name, ID, email, guard
Request Method, URL, path, IP, host, route, action, duration, headers, query params, body, files
CLI Command (for console exceptions)
Job Job name, queue, connection, attempts
Queries Last 5 database queries with execution time
Environment PHP version, Laravel version, memory peak, hostname, git commit, app URL
Trace Stack trace (first 2000 characters)

Performance

Logman has zero impact on normal requests (no exceptions). When an exception occurs:


Security

For production, add authentication middleware and/or an authorize callback:


Custom Channels

Register your own notification channel:

Register it in a service provider:

Then add it to your config:


Artisan Commands

Command Description
logman:install Publish config, create storage directory, add env variables
logman:install --force Overwrite existing config with the package default
logman:install --sync Add missing config keys while preserving existing values and formatting
logman:test Send a test notification to all enabled channels
logman:mute "ClassName" --duration=1d Mute an exception from CLI
logman:list-mutes List all active mutes
logman:clear-mutes Remove all active mutes
logman:digest Send a daily digest summary to all enabled channels
logman:digest --date=2026-04-12 Digest for a specific date
logman:digest --channel=slack Send digest to a specific channel only

Daily Digest

Logman can send a daily summary of all log activity to your enabled channels (Slack, Telegram, Discord, Mail). The digest includes:

Automatic Setup (Recommended)

Enable the daily digest in your config/logman.php — no manual scheduler setup needed:

Logman will automatically register the scheduled command for you.

Per-Channel Control

Each channel has its own daily_digest flag. A channel can receive real-time exception reports but skip the digest, or vice versa:

Manual Setup (Alternative)

If you prefer manual control, you can skip the config flag and schedule it yourself in routes/console.php or app/Console/Kernel.php:

Options


Testing

Tests cover:


License

MIT


All versions of laravel-logman with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/log Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mahmoud-mhamed/laravel-logman contains the following files

Loading the files please wait ...