Download the PHP package devman1917/laravel-mattermost-logging-driver without Composer

On this page you can find all versions of the php package devman1917/laravel-mattermost-logging-driver. 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-mattermost-logging-driver

Laravel Mattermost Logging Driver

This driver allows you to send your logs to your Mattermost instance. It will attach exception stack traces and the log context/

Installation

Configuration

Add the new driver in your config/logging.php:

You can also add the mattermost channel to your stack driver if you wish:

Don't forget to set LOG_CHANNEL=single in your local and testing environments if you don't want to send logs to Mattermost during your tests.

Options

You can add additional options after the driver and via keys in your config/logging.php.

Option Default Description
webhook Your Mattermost webhook url. You must set this.
channel town-square The channel slug where the logs will be send.
level Logger::INFO Messages below this log level will not be sent.
level_mention Logger::ERROR Messages at or above this level will ping the usernames in the mentions key
title_format '**[%s]** %s' The message title format, expressed at a sprintf() formatted string
title_mention_format ' (ping %s)' The message title mention format, expressed at a sprintf() formatted string
username Laravel Log The username to display
mentions ['@channel'] An array of usernames to ping
short_field_length 62 Context content longer than this value will be formatted with a long field
max_attachment_length 6000 Content past this length will be truncated to avoid Mattermost refusing the payload.
icon_url null A relative icon URL to display. UrlGenerator is called to get the full path, so you can use this in multiple environments without resetting the key.
scribe null If you want to override the default message builder, provide your own fully qualified Scribe interface implementation
message null If you want to override the default message, provide your own fully qualified Message interface implementation

Usage

Use this driver like any other. You can send directly to the mattermost channel by using the Log facade, calling the logger function, or getting LogManager from the container. Then call channel(...) or stack([...]).

Sundries

Contributions welcomed.

MIT Licensed. Do as you wish.

Based on https://gitlab.com/thibauddauce/laravel-mattermost-logger/


All versions of laravel-mattermost-logging-driver with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
laravel/framework Version ^11.9
thibaud-dauce/mattermost-php Version ^1.3
monolog/monolog Version ^3.0
coduo/php-to-string Version ^2.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 devman1917/laravel-mattermost-logging-driver contains the following files

Loading the files please wait ....