PHP code example of osi-open-source / laravel-teams-logging
1. Go to this page and download the library: Download osi-open-source/laravel-teams-logging library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
osi-open-source / laravel-teams-logging example snippets
\OsiOpenSource\LaravelTeamsLogging\LoggerServiceProvider::class;
$app->register(\OsiOpenSource\LaravelTeamsLogging\LoggerServiceProvider::class);
$app->configure('teams');
'teams' => [
'driver' => 'custom',
'via' => \OsiOpenSource\LaravelTeamsLogging\LoggerChannel::class,
'level' => 'debug',
'url' => env('INCOMING_WEBHOOK_URL'),
'style' => 'simple', // Available style is 'simple' and 'card', default is 'simple'
],
'teams' => [
'driver' => 'custom',
'via' => \OsiOpenSource\LaravelTeamsLogging\LoggerChannel::class,
'level' => 'debug',
'url' => env('INCOMING_WEBHOOK_URL'),
'style' => 'simple', // Available style is 'simple' and 'card', default is 'simple'
'name' => 'Dummy Project'
],
'teams' => [
'driver' => 'custom',
'via' => \OsiOpenSource\LaravelTeamsLogging\LoggerChannel::class,
'level' => 'debug',
'url' => env('INCOMING_WEBHOOK_URL'),
'style' => 'simple', // Available style is 'simple' and 'card', default is 'simple'
'name' => 'Dummy Project',
'format' => \OsiOpenSource\LaravelTeamsLogging\LoggerHandler::ADVANCED_FORMAT, //%message% %context% %extra%
],
Log::channel('teams')->error('Error message');
Log::channel('teams')->error('Error message', [
'Assigned to' => 'Unassigned'
]);
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'teams'],
],
],
bash
$ php artisan vendor:publish --provider="OsiOpenSource\LaravelTeamsLogging\LoggerServiceProvider"