1. Go to this page and download the library: Download leovince/monolog-teams 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/ */
leovince / monolog-teams example snippets
use LeoVince\MonologTeams\TeamsHandler;
use Monolog\Level;
use Monolog\Logger;
// Create the logger
$log = new Logger('my_logger');
$log->pushHandler(new TeamsHandler('LOG_TEAMS_WEBHOOK_URL', 'APP_NAME', level: Level::Error));
// Use the logger
$log->error('Error message');