Cronario\Logger\Journal::log PHP Method

log() public method

public log ( mixed $level, string $message, array $context = [] ) : null
$level mixed
$message string
$context array
return null
    public function log($level, $message, array $context = array())
    {
        if (!in_array($level, $this->journalRecord)) {
            return null;
        }
        $line = sprintf("%s: %s %s %s", $this->getCurrentDate(), str_repeat('. ', $this->levelToPoints[$level]), $message, '[ ' . implode(' ; ', $context) . ' ]') . PHP_EOL;
        file_put_contents($this->getJournalPath(), $line, FILE_APPEND);
        return null;
    }