monolog_slack_hook.php

<?php require_once "$_SERVER[DOCUMENT_ROOT]/vendor/autoload.php"; use \Monolog\Logger as Logger; use Monolog\Handler\SlackWebhookHandler; // 로거 채널 생성 $log = new Logger('logger name'); // log/your.log 파일에 로그 생성. 로그 레벨은 Info $log->pushHandler(new SlackWebhookHandler( 'hook addr', 'user', 'nickname', true, null, true, true, Logger::INFO ));
php monolog slack webhook

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.