Default logger: log the message to the file defined in atomik/files/log
The message template can be define in atomik/log/message_template

@see Atomik::log()
@param string $message
@param int $level
430650
public static function logToFile($message, $level)
    {
        if ($level > self::$config['level']) {
            return;
        }
        
        $filename = self::$config['filename'];
        $template = self::$config['message_template'];
        $tags = array(
            '%date%' => @date('Y-m-d H:i:s'), 
            '%level%' => $level,
            '%message%' => $message
        );
        
        $file = fopen($filename, 'a');
        fwrite($file, str_replace(array_keys($tags), array_values($tags), $template) . "\n");
        fclose($file);
        $file = null;
    }
960818
public function log($message, $level = LogLevel::DEBUG)
    {
        $this->runtime->log($message, $level);
    }
443879
public function log($level, $message, array $context = []) {
		if (!Logger::check($level)) {
			return;
		}
		if (count($context) > 0) {
			foreach ($context as $k => $v) {
				$message = str_replace('{' . $k . '}', $v, $message);
			}
		}
		syslog($this->getLevel($level), $message);
	}
239600
public function log($level, $message, array $context = array())
    {
        $allContext = array_merge($this->extraContext, $context);

        $this->logger->log($level, $message, $allContext);
    }
1268084
protected function writeLog($level, $message, $context)
    {
        $this->fireLogEvent($level, $message = $this->formatMessage($message), $context);

        $this->logger->{$level}($message, $context);
    }
902698
public function log($level, $message, array $context = array())
    {
        if (isset($this->levels[$level]) && $this->levels[$level] < $this->minLevel) {
            return;
        }
    
        if (!empty($this->context) || !empty($context)) {
            $context = array_merge($this->context, $context);
        }
        
        if ($this->prefix !== '') {
            $this->logger->log($level, $this->prefix . $message, $context);
        } else {
            $this->logger->log($level, $message, $context);
        }
    }
210119
public static function log($level, $message, array $context = array())
    {
        return self::getInstance()->log($level, $message, $context);
    }
1374749
private function log($message, $level)
    {
        // Only log if the logger is enabled.
        if (!$this->isEnabled) {
            return;
        }

        if ($level <= $this->level) {
            $requestId = null;
            try {
                $requestID = Application::getCurrent()->getRequestId();
            } catch (CoreException $exception) {
                $requestID = '---';
            }

            $logMessage = sprintf(
                '%s: %s [%s] %s' . PHP_EOL,
                $this->id,
                $requestId ?: '———',
                @self::$levelNames[$level],
                $message
            );

            // Commit the log message.
            if (empty($this->errorLogFile)) {
                // If no log file is specified, use the default PHP location.
                error_log($logMessage);
            } else {
                // Silence the eventual error if the message cannot be written
                // to the log, so that it doesn't interrupt the program.
                @file_put_contents(
                    $this->errorLogFile,
                    $logMessage,
                    FILE_APPEND
                );
            }
        }
    }
544180
public function log($level, $message, array $context = array()) {
		$result = call_user_func($this->callback, $level, $message, $context);
		if($result) {
			$this->logger()->log($level, $message, $context);
		}
	}
904914
protected function logMessage($level, $message)
    {
        if (array_search($level, $this->levels) > $this->levelPosition) {
            return;
        }

        echo $message;
    }
1297898
public function log($level, $message, array $context = array())
    {
        $messageArray = [
            date('Y/m/d H:i:s')." [". $level . "] " . $message
        ];

        if (!empty($context)) {
            $messageArray[] = 'Context:';
            foreach ($context as $key => $value) {
                $messageArray[] =  $key . ' => ' . var_export($value, true);
            }
        }
        $trace = $this->getTrace();
        $messageArray[] = 'Trace:';
        $messageArray[] = $trace['trace'];

        $file = $this->path . DIRECTORY_SEPARATOR . 'application.log';
        if (!file_exists($this->path)) {
            mkdir($this->path, 0777, true);
        }

        file_put_contents(
            $file,
            implode("\n", $messageArray),
            FILE_APPEND
        );
    }
161868
public function log($level, $message, array $context = [])
    {
        if (in_array($level, $this->acceptedLevels, true)) {
            $this->logger->log($level, $message, $context);
        }
    }
1095414
public function log($level, $message, array $context = array())
    {
        $this->getClient()->notify(
            $message,
            array_merge(['level' => $this->levelMapping[$level]], $this->getExtractor()->extract($context))
        );
    }
1057416
public function log($level, $message, array $context = array()) {
		try {
			call_user_func($this->callable, $level, $message, $context);
		} catch(\Exception $e) {
		}
	}
947455
public static function log($level, $message, array $context = array())
    {
        App::getBean('Logger')->log($level, $message, static::parseContext($context));
    }
411155
public function log($level, $message, array $context = array())
    {
        if (!$this->fileName) {
            return;
        }
        file_put_contents($this->fileName, '['.$level.'] - '.$message.' | '.serialize($context));
    }
847166
public function log($level, $message, array $context = array())
    {
        if (in_array($level, $this->levels)) {
            file_put_contents(
                $this->logFile, $message . PHP_EOL, FILE_APPEND
            );
        }
    }