log event information into file

@param array|string|object $message
@param array $context
@return $this
969567
public function makeLog($message, array $context = [])
    {
        $this->log($this->defaultParams['level'], $message, $context);

        return $this;
    }
1305811
public function info($message, array $context = array())
    {
        if (self::isSetLogger()) {
            return self::$logger->info($message, $context);
        }

        return false;
    }
20801
public function info($message, array $context = [])
    {
        $this->checkInitialized();

        foreach ($this->loggers as $logger) {
            $logger->info($message, $context);
        }
    }
252916
public function alert($message, array $context = array())
    {
        // TODO: Implement alert() method.
        return $this->addRecord(\Psr\Log\LogLevel::ALERT, $message, $context);
    }
277266
public function log($level, $message, array $context = array())
    {
        return error_log(self::PREFIX.' '.strtoupper($level).': '.$message.' '.
            (!empty($context) ? print_r($context, true) : ''));
    }
1202814
public function log($level, $message, array $context = [])
    {
        if (!Container::get('config')->get('app_debug') && $level != 'APP') {
            return;
        }

        // build a replacement array with braces around the context keys
        $replace = [];
        foreach ($context as $key => $val) {
            // check that the value can be casted to string
            if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) {
                $replace['{' . $key . '}'] = $val;
            }
        }

        $message = strtr($message, $replace);
        $message = date('[Y-m-d H:i:s]') . "\r\n" . "[{$level}]" . "\r\n" . $message . "\r\n\r\n";
        $logPath = Container::get('config')->get('app_full_path') . '/logs';
        if (!file_exists($logPath)) {
            Helper::mkdirs($logPath);
        }

        if (file_exists($logPath)) {
            file_put_contents($logPath . '/' . date('Ymd') . '.log', $message, FILE_APPEND);
        }
    }
705791
public static function log($message, array $context = array(), $level = Logger::INFO, $logname = null)
    {
        $_this = self::getInstance();
        if ($_this->getOption('enable_logging')===false) {
            return;
        }
        $default_context = array(
            'url' => $_this->getRequest()->getUrl()
        );
        return self::getInstance()->getLogger()
            ->log($level, $message, array_merge($default_context, $context), $logname);
    }
706515
public function log($level, $message, array $context = [])
    {
        $context_output = empty($context) ? '' : sprintf(' :: %s', json_encode($context));

        $logline = sprintf("[%s] %s%s\n", strtoupper($level), $message, $context_output);

        $handle = in_array($level, self::ERROR_LEVELS, false) ? STDERR : STDOUT;

        fwrite($handle, $logline);
    }
1138516
public function debug($message, array $context = [])
    {
        if ($this->logger instanceof LoggerInterface) {
            $this->logger->debug($message, $context);
        }
    }
44868
public function log($level, $message, array $context = []) {
		if ($this->getConfig('type')) {
			$level = $this->getConfig('type');
		} elseif ($this->getConfig('file')) {
			$level = $this->getConfig('file');
		}

		return $this->Logs->log($level, $message, $context);
	}
365692
public function log($channel, $level, $message, array $context = [])
    {
        if (is_array($channel)) {
            foreach ($channel as $cat) {
                $this->log($cat, $level, $message, $context);
            }

            return $this;
        }

        if (is_array($message)) {
            foreach ($message as $msg) {
                $this->log($channel, $level, $msg, $context);
            }

            return $this;
        }

        $this->getLogger($channel)->log($level, $message, $context);

        return $this;
    }
962669
public function event($event, $level, $message, $context = []) {
        $context['event'] = $event;
        $this->log($level, $message, $context);
    }
169598
function log($level, $message, array $context = array())
	{
		foreach($this->_loggers as $logger)
			$logger->log($level, $message, $context);

		return $this;
	}
839749
public function log($level, $message, array $context = [])
    {
        $record = new LogRecord($level, $message);

        // add all messages to session log
        $this->session->addRecord($record);

        // write record into log only if it is enough by level
        if ($this->logLevel >= $level) {
            $this->write($record);
        }
    }
1324079
public function info(string $message, array $context = []){
        if($this->logger !== null){
            $this->logger->info($message, $context);
        }

        if($this->messagePanel !== null){
            $this->messagePanel->addMessage($message, LogLevel::INFO);
        }
    }
1028192
public function log($level, $message, array $context = [])
    {
        if (isset($this->app) && isset($this->app->logger) && $this->app->logger instanceof \Psr\Log\LoggerInterface) {
            $this->app->logger->log($level, $message, $context);
        } else {
            $this->_echo_stderr("$message\n");
        }

        return $this;
    }
547224
public function log($level, $message, array $context = array()) {
		$ctx = $context;
		if(!count($ctx)) {
			$ctx = new \stdClass();
		}
		$message = sprintf($this->format, $message, json_encode($ctx, $this->jsonOptions));
		$this->logger()->log($level, $message, $context);
	}