Register a file log handler.

@param  string  $path
@param  string  $level
@return void
347743
public function useFiles($path, $level = 'debug')
    {
        $this->monolog->pushHandler($handler = new StreamHandler($path, $this->parseLevel($level)));

        $handler->setFormatter($this->getDefaultFormatter());
    }
1323957
public function log($level, $message)
    {
        if (func_num_args() > 3) {
            $args = array_slice(func_get_args(), 3);
            if (is_array($args[0])) {
                $args = $args[0];
            }
            $this->log->write($level, $this->className, $message, $args);
        } else {
            $this->log->write($level, $this->className, $message);
        }
    }
1359484
public function log($level, $message, array $context = array())
    {
        $this->dispatcher->dispatch(Log::EVENT_NAME, new Log($level, $message, $context, []));
    }
35856
public function log($level, $message, array $context = []): void {
        if ($this->logger instanceof LoggerInterface) {
            $message = $this->interpolate($message, $context);
            $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))
        );
    }
7338
private function log($msg, $level = 'info') {
        static $logFile = null;
        if (is_null($logFile)) {
            $logDir = $this->appContext->getRuntimeDir() . '/log';
            if (!is_dir($logDir)) {
                mkdir($logDir, 0755, true);
            }
            $logFilePath = "$logDir/event-listend.log";
            $logFile = fopen($logFilePath, 'a');
        }

        $time = date('Y-m-d H:i:s');
        $logData = "[{$level}] [{$time}] {$msg}\n";
        fwrite($logFile, $logData);
    }
833567
public function log($level, $message, array $context = array())
    {
        if ($this->outputIsUrgent($level) || $this->isEnabled()) {
            $this->dispatch($message, $context);
        }
    }
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;
    }
781908
private function log($line, $log_level) 
	{
		// Write all events less than log verbosity
		if ($log_level <= $this->log_verbosity) {
			$line = $this->prepend($log_level) . $line . "\n";
			$this->writeLine($line);
		}
	}
1144412
public function log($message, $level)
    {
        Injector::inst()->get(LoggerInterface::class)->log($level, $message);
    }
239600
public function log($level, $message, array $context = array())
    {
        $allContext = array_merge($this->extraContext, $context);

        $this->logger->log($level, $message, $allContext);
    }
1216695
public function log($level, $message, array $context = array())
    {
        $record = array(
            'channel'  => $this->channel,
            'level'    => $level,
            'message'  => $message,
            'context'  => $context,
            'extra'    => array(),
            'datetime' => new \DateTime(),
        );

        if ($this->isHandling($record)) {
            foreach ($this->processors as $processor) {
                $record = call_user_func($processor, $record);
            }
            $this->handler->handle($record);
        }
    }
557160
public function log($level, $message, array $context = [])
    {
        /** @var LoggerInterface|AdapterInterface $logTarget */
        foreach ($this->logTargets as $logTarget) {
            if (($logTarget instanceof AdapterInterface)) {
                $logTarget->log($this->getPhalconLoggerLevel($level), $message, $context);
            } else {
                $logTarget->log($level, $message, $context);
            }
        }
    }
1243561
public function write(string $level, string $message, array $context)
    {
        $this->logger->log($level, $message, $context);
    }
459767
public function log(string $level, string $message, array $context = []): void
    {
        if ($this->levelIsValid($level) === false) {
            throw new \InvalidArgumentException('Invalid log-level provided.');
        }

        // do not log if level is below min level:
        if ($this->isHandling($level) === false) {
            return;
        }

        $pathToLogfile = $this->openLogfile();
        $lineToLog = sprintf('[ %s ] %s: %s', date('Y-m-d H:i:s'), ucfirst($level), $message) . PHP_EOL;
        if (!empty($context)) {
            $lineToLog .= '--- Context ---' . PHP_EOL;
            $lineToLog .= print_r($context, true) . PHP_EOL;
        }
        file_put_contents($pathToLogfile, $lineToLog, FILE_APPEND);
    }
618465
public void log(Level level, Object message) {
        doLog(level, FQCN, message, null, null);
    }
1227579
public function createDefaultStreamLogger($name, $path, $level = Logger::DEBUG)
    {
        $logger = new Logger($name);
        $handler = new \Monolog\Handler\StreamHandler($path, $level);
        $logger->pushHandler($handler);
        $this->loggers[$name] = $logger;

        return $this;
    }