Skip to content

Commit ae8382f

Browse files
committed
repair logger
1 parent 204d43a commit ae8382f

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Illuminate/Log/Writer.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,6 @@ public function __call($method, $parameters)
275275

276276
call_user_func_array($this->fireLogEvent(...), array_merge(array($method), $parameters));
277277

278-
$method = 'add'.ucfirst($method);
279-
280278
return $this->callMonolog($method, $parameters);
281279
}
282280

tests/Log/LogWriterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ public function testErrorLogHandlerCanBeAdded()
4545
public function testMagicMethodsPassErrorAdditionsToMonolog()
4646
{
4747
$writer = new Writer($monolog = m::mock(Logger::class));
48-
$monolog->shouldReceive('addError')->once()->with('foo')->andReturn('bar');
48+
$monolog->shouldReceive('error')->once()->with('foo');
4949

50-
$this->assertEquals('bar', $writer->error('foo'));
50+
$writer->error('foo');
5151
}
5252

5353

5454
public function testWriterFiresEventsDispatcher()
5555
{
5656
$writer = new Writer($monolog = m::mock(Logger::class), $events = new Illuminate\Events\Dispatcher);
57-
$monolog->shouldReceive('addError')->once()->with('foo');
57+
$monolog->shouldReceive('error')->once()->with('foo');
5858

5959
$events->listen('illuminate.log', function($level, $message, array $context = [])
6060
{

0 commit comments

Comments
 (0)