mirror of
https://github.com/Seldaek/monolog.git
synced 2025-02-23 22:42:38 +01:00
Remove new live from default error_log formatter
error_log() function already insert a new line at end of the given message, this commit just remove the new line at end to remove the new live duplication.
This commit is contained in:
parent
03000a7fcd
commit
56fb91f3c2
20
src/Monolog/Formatter/ErrorLogFormatter.php
Normal file
20
src/Monolog/Formatter/ErrorLogFormatter.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Monolog package.
|
||||
*
|
||||
* (c) Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Monolog\Formatter;
|
||||
|
||||
/**
|
||||
* @author Henrique Moody <henriquemoody@gmail.com>
|
||||
*/
|
||||
class ErrorLogFormatter extends LineFormatter
|
||||
{
|
||||
const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%";
|
||||
}
|
@ -11,6 +11,7 @@
|
||||
|
||||
namespace Monolog\Handler;
|
||||
|
||||
use Monolog\Formatter\ErrorLogFormatter;
|
||||
use Monolog\Logger;
|
||||
|
||||
/**
|
||||
@ -53,6 +54,14 @@ class ErrorLogHandler extends AbstractProcessingHandler
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getDefaultFormatter()
|
||||
{
|
||||
return new ErrorLogFormatter();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user