@param Logger     $logger
@param            $level
@param            $message
@param \Exception $throwable

@return string
771910
public function render(Logger $logger, $level, $message, \Exception $throwable = null)
    {
        if (!is_callable($this->callable)) {
            return LoggerRender::render(null);
        }

        return LoggerRender::render(call_user_func($this->callable));
    }
900436
public static function log ($message, $level = null) {
		$level = ($level !== null) ? $level : self::$default_level;
		return self::write (self::get_struct ($message, $level));
	}
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
                );
            }
        }
    }
762175
private function doWrite($level, $message) {
            $this->lastMessage = $message;
            $this->fopen();

            if ($this->fp && is_resource($this->fp)) {
                $message = $this->buildMessage($level, $message);
                $this->lastMessageFull = $message;
                $ok = $this->config->lock ? [flock($this->fp, LOCK_EX),
                                             fwrite($this->fp, $message),
                                             flock($this->fp, LOCK_UN)] : [fwrite($this->fp, $message)];

                return !in_array(false, $ok, true);
            }

            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }
940614
public function logException(Exception $exception, $message = null)
    {
        $msg = $exception->getMessage();
        if ($message != null) {
            $msg = "Message: " . $message . " Exception: " . $msg;
        }
        $this->doLog(LogHelper::LOG_LEVEL_FATAL, $msg, null);
    }
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;
    }
927602
private function logMessage(
        LoggerInterface $logger,
        string $level,
        string $value
    ) {
        /**
         * Logs content, using specified level.
         */
        $logger->$level($value);
    }
1121708
public void logDebug(Object[] message,Throwable throwable)
    {
        this.log(LogLevel.DEBUG,message,throwable);
    }
166981
static public function log($message, $level, $a, $depth, $display, $logger) {
        // Send to standard loggers
        $logmessage = $message;
        $options = empty($depth) ? array() : array('depth' => $depth);
        if (!empty($a)) {
            $logmessage = $logmessage . ' ' . implode(', ', (array)$a);
        }
        $logger->process($logmessage, $level, $options);

        // If $display specified, send translated string to output_controller
        if ($display) {
            output_controller::get_instance()->output($message, 'backup', $a, $depth);
        }
    }
83016
public void logError(Object[] message,Throwable throwable)
    {
        this.log(LogLevel.ERROR,message,throwable);
    }
880808
@Override
    protected void logImpl(LogLevel level,Object[] message,Throwable throwable)
    {
        //format log message (without exception)
        String text=this.formatLogMessage(level,message,null);

        //get log level
        int levelValue=level.getValue();
        switch(levelValue)
        {
            case LogLevel.DEBUG_LOG_LEVEL_VALUE:
                this.APACHE_LOGGER.debug(text);
                break;
            case LogLevel.ERROR_LOG_LEVEL_VALUE:
                this.APACHE_LOGGER.error(text,throwable);
                break;
            case LogLevel.INFO_LOG_LEVEL_VALUE:
            default:
                this.APACHE_LOGGER.info(text);
                break;
        }
    }
1286425
public static void logServer(int logLevel, String message, Throwable throwable) {
		String logMessage = message;
		if (null == logMessage) {
			logMessage = "";
		}
		if (null != throwable) {
			logMessage += "\n" + getMessage(throwable);
		}
		LogRequest logRequest = new LogRequest();
		logRequest.setLevel(logLevel);
		logRequest.setStatement(logMessage);
		GwtCommand command = new GwtCommand(LogRequest.COMMAND);
		command.setCommandRequest(logRequest);
		Deferred deferred = new Deferred();
		deferred.setLogCommunicationExceptions(false);
		GwtCommandDispatcher.getInstance().execute(command, deferred);
	}
820951
private function logEvent($event, $message, $level)
    {
        if ($event === 'not-allowed') {
            $message = sprintf('Method Not Allowed: %s', $message);
        } elseif ($event === 'not-found') {
            $message = sprintf('Page Not Found: %s', $message);
        }

        $this->logger->$level($message);
    }
1144412
public function log($message, $level)
    {
        Injector::inst()->get(LoggerInterface::class)->log($level, $message);
    }
598416
public function write($level, $message, $log_category = null, $options = array())
    {
        $default_option                  = [];
        $default_option['log_request']   = $this->_configRead('log_request');
        $default_option['log_post_data'] = $this->_configRead('log_post_data');
        $default_option['log_cookies']   = $this->_configRead('log_cookies');
        $default_option['log_session']   = $this->_configRead('log_session');
        $default_option['log_headers']   = $this->_configRead('log_headers');

        $options = array_merge($default_option, $options);

        $options['log_category']  = $log_category;

        return AlaxosLog::write($level, $message, $options);
    }
1264291
public function log($message, $level = LogLevel::DEBUG)
    {
        if ($this->logger instanceof LoggerInterface) {
            $this->logger->log($level, $message);
        }
    }
897269
private function _haltOnErrorAction(Exception $exception = null, $message = '', $level = Project::MSG_INFO)
    {
        if ($this->_haltonerror) {
            throw new BuildException(
                $exception !== null ? $exception : $message,
                $this->getLocation()
            );
        } else {
            $this->log(
                $exception !== null && $message === '' ? $exception->getMessage() : $message,
                $level
            );
        }

    }