Skip to content

Commit

Permalink
Merge pull request #9 from bladi87/master
Browse files Browse the repository at this point in the history
monolog 1.15.0 mkdir fix
  • Loading branch information
Flynsarmy committed Jul 15, 2015
2 parents 62ff4a8 + fc8ef7e commit 2a3a206
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions Log/MonologWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,23 @@ class MonologWriter
* (array) Array of monolog processors - anonymous functions
*
* @param array $settings
* @param bool $merge
* @return void
*/
public function __construct($settings = array())
public function __construct($settings = array(), $merge = true)
{
//Merge user settings
$this->settings = array_merge(array(
'name' => 'SlimMonoLogger',
'handlers' => array(
new \Monolog\Handler\StreamHandler('./logs/'.date('y-m-d').'.log'),
),
'processors' => array(),
), $settings);
if ($merge) {
$this->settings = array_merge(array(
'name' => 'SlimMonoLogger',
'handlers' => array(
new \Monolog\Handler\StreamHandler('./logs/'.date('y-m-d').'.log'),
),
'processors' => array(),
), $settings);
} else {
$this->settings = $settings;
}
}

/**
Expand Down

0 comments on commit 2a3a206

Please sign in to comment.