From 3f61583b62d988c4e7939e5c37cdc02d6c666344 Mon Sep 17 00:00:00 2001 From: Evgeny Shpilevsky Date: Thu, 5 Dec 2013 12:00:15 +0300 Subject: [PATCH] add example of formatter configuration --- README.md | 8 +++++++- src/EnliteMonolog/Service/MonologServiceFactory.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c0d2703..9a722fd 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,13 @@ By default it write logs to `data/logs/application.log`. If you want change this 'path' => 'data/log/application.log', 'level' => \Monolog\Logger::DEBUG, 'bubble' => true - ) + ), + 'formatter' => array( + 'name' => 'Monolog\Formatter\LogstashFormatter', + 'args' => array( + 'application' => 'My Application', + ), + ), ), // by service locator diff --git a/src/EnliteMonolog/Service/MonologServiceFactory.php b/src/EnliteMonolog/Service/MonologServiceFactory.php index 2083507..8b031b0 100644 --- a/src/EnliteMonolog/Service/MonologServiceFactory.php +++ b/src/EnliteMonolog/Service/MonologServiceFactory.php @@ -88,7 +88,7 @@ public function createHandler(ServiceLocatorInterface $serviceLocator, $handler) /** * @param ServiceLocatorInterface $serviceLocator - * @param string|array $handler + * @param string|array $formatter * @return FormatterInterface * * @throws RuntimeException