From af2c0ce74fae5310089f3aee4be563d9073a67c5 Mon Sep 17 00:00:00 2001 From: Okada Shohei Date: Mon, 18 Mar 2019 08:25:54 +0900 Subject: [PATCH] =?UTF-8?q?Logger=20=E3=81=AB=E5=90=84=E7=A8=AE=20Processo?= =?UTF-8?q?r=20=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=A7=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=AF=E3=83=A9=E3=82=B9=E3=82=92=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/Logging/CustomizeLogger.php | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/app/Logging/CustomizeLogger.php diff --git a/src/app/Logging/CustomizeLogger.php b/src/app/Logging/CustomizeLogger.php new file mode 100644 index 0000000..bef4703 --- /dev/null +++ b/src/app/Logging/CustomizeLogger.php @@ -0,0 +1,35 @@ +getHandlers() as $handler) { + // url, ip, http_method, referrer を extra に追加 + $handler->pushProcessor(new WebProcessor()); + // file, line, class, function を extra に追加 + $handler->pushProcessor(new IntrospectionProcessor(\Monolog\Logger::DEBUG, ['Illuminate\\'])); + // process_id を extra に追加 + $handler->pushProcessor(new ProcessIdProcessor()); + // process_type を extra に追加 + $handler->pushProcessor(new ProcessTypeProcessor()); + } + } +}