Logs data to disk or stdout
@param string $msg
@param int $level
@param array $data
@return bool
358417
public function log($msg, $level = self::INFO, array $data = [])
    {
        if (is_numeric($level) && $level > $this->level) {
            return true;
        }

        $strData = $data ? json_encode($data) : '';

        if ($this->toSyslog) {
            return $this->sysLog($msg . ' ' . $strData, $level);
        }

        $label = self::getLevelName($level);
        $ds = FormatHelper::microTime(microtime(true));

        // [$this->getPidRole():$this->pid] $msg
        $logString = sprintf("[%s] [%s] %s %s\n", $ds, $label, trim($msg), $strData);

        // if not in daemon, print log to \STDOUT
        if (!$this->toConsole) {
            $this->stdout($logString, false);
        }

        if ($this->fileHandle) {
            $this->count++;
            $this->cache[] = Cli::clearColor($logString);

            if ($this->count >= $this->logThreshold || $this->fileIsChanged()) {
                $this->flush();
            }
        }

        return true;
    }
901740
function Log($level,$message, $data = "")
	{
		$data = $data != "" ? ": $data" : "";
		switch ($level)
		{
			case DBH_LOG_DEBUG:
				if ($this->LogLevel & DBH_LOG_DEBUG) print "<pre style='color: silver;'>$message</pre>\r\n";
				break;
			case DBH_LOG_INFO:
				if ($this->LogLevel & DBH_LOG_INFO) print "<pre style='color: blue;'>$message $data</pre>\r\n";
				break;
			case DBH_LOG_QUERY:
				if ($this->LogLevel & DBH_LOG_QUERY) print "<pre style='color: green;'>$message $data</pre>\r\n";
				break;
			case DBH_LOG_WARNING:
				if ($this->LogLevel & DBH_LOG_WARNING) print "<pre style='color: orange;'>$message $data</pre>\r\n";
				break;
			case DBH_LOG_ERROR:
				if ($this->LogLevel & DBH_LOG_ERROR) print "<pre style='color: red;'>$message $data</pre>\r\n";
				break;
		}
		
	}
48620
private static function log(string $level, string $message, array $context = [])
    {
        if (static::$logger !== null) {
            static::$logger->$level($message, $context);
        }
    }
958551
public function log($level, $message, array $context = array())
    {
        $log_id = '';
        if ($this->_levels[$this->_level] < $this->_levels[$level]) {
            return false;
        }

        if ($this->_levels[$level] <= $this->_levels[LogLevel::ERROR]) {
            $this->last_log_id = $this->generateId();
            $log_id = "{{$this->last_log_id}} ";
        }

        if (!empty($context)) {
            $message .= PHP_EOL.$this->indent($this->dumpContext($context));
        }

        $message = "[{$this->getTimestamp()}] [".strtoupper($level)."] {$log_id}{$message}".PHP_EOL;

        $this->write($message);

        return true;
    }
1293210
public function log($level, $message, array $context = [])
    {
        if ( ! in_array($level, $this->threshold)) {
            return false;
        }

        // Try to get language message
        $langMessage = language()->getLine($message, $context);

        // Re-Define message
        $message = empty($langMessage) ? $message : $langMessage;

        if ( ! is_dir($this->path)) {
            mkdir($this->path, true, 0775);
        }

        $this->lines[] = new \ArrayObject([
            'level'   => strtoupper($level),
            'time'    => date('r'),
            'message' => $message,
        ], \ArrayObject::ARRAY_AS_PROPS);

        $isNewFile = false;
        $filePath = $this->path . 'log-' . date('d-m-Y') . '.log';

        $log = '';

        if ( ! is_file($filePath)) {
            $isNewFile = true;
        }

        if ( ! $fp = @fopen($filePath, 'ab')) {
            return false;
        }

        $log .= strtoupper($level) . ' - ' . date('r') . ' --> ' . $message . "\n";

        flock($fp, LOCK_EX);

        $result = null;
        for ($written = 0, $length = strlen($log); $written < $length; $written += $result) {
            if (($result = fwrite($fp, substr($log, $written))) === false) {
                break;
            }
        }

        flock($fp, LOCK_UN);
        fclose($fp);

        if ($isNewFile === true) {
            chmod($filePath, 0664);
        }

        return (bool)is_int($result);
    }
301202
public function log($level, $message, array $context = array())
    {
        if (self::isSetLogger()) {
            return self::$logger->log($level, $message, $context);
        }

        return false;
    }
1264291
public function log($message, $level = LogLevel::DEBUG)
    {
        if ($this->logger instanceof LoggerInterface) {
            $this->logger->log($level, $message);
        }
    }
647376
public static function log($message, $level = Logger::INFO)
    {
        if (! self::$logger) {
            $logfile = sprintf('%s%sarrowsphere-client.log', sys_get_temp_dir(), DIRECTORY_SEPARATOR);
            
            // create a log channel
            self::$logger = new Logger('xAC');
            self::$logger->pushHandler(new StreamHandler($logfile, Logger::INFO));
        }
        
        return self::$logger->addRecord($level, $message);
    }
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);
        }
    }
174800
protected function _log($level, $args)
    {
        foreach ($args as $message) {
            $this->send($level, $message);
        }
    }
408041
public function track($col, $msg, $level = 'normal', $merge = true) {
        if (empty($this->_row)) {
            $this->flush(); //init arrays
        }
        if (!in_array($col, $this->columns)) {
            debugging('Incorrect column:'.$col);
            return;
        }
        if ($merge) {
            if ($this->_row[$col][$level] != '') {
                $this->_row[$col][$level] .='<br />';
            }
            $this->_row[$col][$level] .= $msg;
        } else {
            $this->_row[$col][$level] = $msg;
        }
    }
1206037
public static function log( $level, $message, array $context = [] )
	{
		return static::__do( __FUNCTION__, args_with_keys( func_get_args(), __CLASS__, __FUNCTION__ ) );
	}
54599
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);
			}
		}
		$content = sprintf("%s | %s | %s | %s", date('Y-m-d H:i:s'), $this->getLevel($level), microtime(true), $message);
		co::fwrite($this->handler, $content);
	}
938589
public function log($msg, $level = Project::MSG_INFO)
    {
        $this->logObject($this, $msg, $level);
    }
210119
public static function log($level, $message, array $context = array())
    {
        return self::getInstance()->log($level, $message, $context);
    }
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);
		}
	}
805148
public function log($level, $message, array $context = array())
    {
        if ($this->logLevels[$this->logLevelThreshold] < $this->logLevels[$level]) {
            return;
        }
        $message = $this->formatMessage($level, $message, $context);
        $this->write($message);
    }