Skip to content

Commit

Permalink
Merge pull request #9 from neighborhoods/feature/logger-love
Browse files Browse the repository at this point in the history
  • Loading branch information
rhift authored Jul 2, 2018
2 parents d8db0ae + a2654f4 commit 1e53c6b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Process/Pool/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class Logger extends Log\AbstractLogger implements LoggerInterface
use Time\AwareTrait;
use Logger\Message\Factory\AwareTrait;
use Defensive\AwareTrait;
const PROP_IS_ENABLED = 'is_enabled';
public const PROP_IS_ENABLED = 'is_enabled';
protected const LOG_DATE_TIME_FORMAT = 'D, d M y H:i:s.u T';

protected $log_formatter;
protected $level_filter_mask;
Expand All @@ -41,9 +42,9 @@ public function log($level, $message, array $context = [])
$processId = '?';
}

$referenceTime = $this->_getTime()->getUnixReferenceTimeNow();
$referenceTime = $this->_getTime()->getNow();
$logMessage = $this->getProcessPoolLoggerMessageFactory()->create();
$logMessage->setTime($referenceTime);
$logMessage->setTime($referenceTime->format(self::LOG_DATE_TIME_FORMAT));
$logMessage->setLevel($level);
$logMessage->setProcessId($processId);
$logMessage->setProcessPath($this->_getProcess()->getPath());
Expand Down

0 comments on commit 1e53c6b

Please sign in to comment.