Fix logging issue when using the laravel.log event.
This commit is contained in:
parent
c2a255c788
commit
d64d6c9092
|
@ -49,16 +49,10 @@ public static function write($type, $message)
|
||||||
Event::fire('laravel.log', array($type, $message));
|
Event::fire('laravel.log', array($type, $message));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there aren't listeners on the log event, we'll just write to the
|
|
||||||
// log files using the default conventions, writing one log file per
|
|
||||||
// day so the files don't get too crowded.
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$message = static::format($type, $message);
|
$message = static::format($type, $message);
|
||||||
|
|
||||||
File::append(path('storage').'logs/'.date('Y-m-d').'.log', $message);
|
File::append(path('storage').'logs/'.date('Y-m-d').'.log', $message);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Format a log message for logging.
|
* Format a log message for logging.
|
||||||
|
|
Loading…
Reference in New Issue