alfiosalanitri/laravel-flask-logger

A log handler for Laravel that sends logs to a Flask server started with https://github.com/alfiosalanitri/flask-log-monitor

Maintainers

Package info

github.com/alfiosalanitri/laravel-flask-logger

pkg:composer/alfiosalanitri/laravel-flask-logger

Statistics

Installs: 127

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-01-20 08:50 UTC

This package is auto-updated.

Last update: 2026-02-20 09:03:19 UTC


README

A log handler for Laravel that sends logs to a Flask server running the Flask Log Monitor application.

⚠️ Dependency: This package requires a running instance of the Flask Log Monitor server. You can clone and start it from https://github.com/alfiosalanitri/flask-log-monitor.

Installation

composer require alfiosalanitri/laravel-flask-logger

Configuration

You can publish the configuration file:

php artisan vendor:publish --tag=config

Or use the environment variables directly:

LOG_CHANNEL=stack
LOG_STACK=flask,daily
LOG_FLASK_URL=http://localhost:5000
LOG_FLASK_TOKEN=secret

Make sure your Flask Log Monitor server is running and reachable at the URL defined in LOG_FLASK_URL.

Usage

Send logs to your Flask server using the flask channel:

Log::channel('flask')->info('Test log sent to Flask!', ['foo'=>'bar']);

If the Flask server is unavailable, logs will automatically fall back to the local daily channel.

License

MIT License © Alfio Salanitri