Skip to content

Instantly share code, notes, and snippets.

@uyab
Last active August 31, 2015 04:46
Show Gist options
  • Save uyab/bf05228a65452e26103b to your computer and use it in GitHub Desktop.
Save uyab/bf05228a65452e26103b to your computer and use it in GitHub Desktop.
Memisah log aplikasi Laravel
...
$app->configureMonologUsing(function($monolog) use ($app){
$bubble = false;
foreach($monolog->getLevels() as $name => $level) {
$name = strtolower($name);
$monolog->pushHandler(new \Monolog\Handler\StreamHandler($app->storagePath() . "/logs/{$name}.log", $level, $bubble));
}
});
return $app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment