Logs a message to the output.

@param string $mesg The message to log.
@param int $severity The log level necessary for this message to display.
432555
protected static function log($mesg, $severity=self::CRITICAL) {
        if ($severity >= self::$log_level) {
            printf("[%s] %s\n", date('c'), $mesg);
        }
    }
1046691
protected function log($message, $severity = LOG_INFO)
    {
        if (!isset($this->severityLabels[$severity])) {
            throw new Exception('Invalid severity value', 1426868867);
        }
        $this->importService->addEventMessage(sprintf('Record:Import:Log:%s', $this->severityLabels[$severity]), $message, $severity, $this->currentEvent);
    }
1280155
private function log($msg, array $context = array())
    {
        /** @var \Psr\Log\LoggerInterface $logger */
        $logger = $this->container['logger'];
        $logger->log($this->container['log_level'], $msg, $context);
    }
937442
function log_exception($severity, $message, $filepath, $line)
	{
		$severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];

		log_message('error', 'Severity: '.$severity.'  --> '.$message. ' '.$filepath.' '.$line, TRUE);
	}
1298152
public void finer(String mesg, Throwable t) {
        log(Level.FINER, mesg, t);
    }
1115031
private function sendGCMessage($mes, $text, $to)
    {
        $message=new AndroidMessage();
        $message->setMessage($text);
        $message->setData($mes);
        $message->setDeviceIdentifier($to);
        $message->setGCM(true);
//        $logger = $this->container->get('logger');
//        $logger->emerg(implode(',', $message->getData()));
        try {
            $response = $this->container->get('rms_push_notifications')->send($message);
        } catch (InvalidMessageTypeException $e) {
            throw $e;
        }

        return $response;
    }
136020
public void severe(String msg) {
        if (Level.SEVERE.intValue() < levelValue) {
            return;
        }
        log(Level.SEVERE, msg);
    }
558961
protected function logError(string $msg)
    {
        $this->logger->error('CMD: ' . $msg);
        $this->out->writeln("<error>$msg<error>");
    }
1314833
def _log(self, message, severity=Logger.DEBUG):
        
        return self.logger.log(message, severity, self.TAG)
987608
public void msg( Thread t, int severity, Object source, Throwable ex, String msg ) {
        logger.msg( t, severity,source,ex,msg);
    }
9292
public function log($message, $severity = null)
    {
        if (is_null($this->logger)) {
            $this->logger = LogManager::getLogger('propel');
        }

        switch ($severity) {
            case 'crit':
                $method = 'fatal';
                break;
            case 'err':
                $method = 'error';
                break;
            case 'alert':
            case 'warning':
                $method = 'warning';
                break;
            case 'notice':
            case 'info':
                $method = 'info';
                break;
            case 'debug':
            default:
                $method = 'debug';
        }

        // get a backtrace to pass class, function, file, & line to Mojavi logger
        $trace = debug_backtrace();

        // call the appropriate Mojavi logger method
        $this->logger->{$method} (
            $message,
            $trace[2]['class'],
            $trace[2]['function'],
            $trace[1]['file'],
            $trace[1]['line']
            );
    }
839117
public static void log (@Nonnull final Class <?> aLoggingClass,
                          @Nonnull final IHasErrorLevel aErrorLevelProvider,
                          @Nonnull final String sMsg)
  {
    log (aLoggingClass, aErrorLevelProvider.getErrorLevel (), sMsg, null);
  }
590519
private function _writeLog($msg) {
        $log = "-------------------------------------\n";
        $log .= date('Y-m-d H:i:s') . ":\n";
        $log .= $msg."\n";
        $log .= "-------------------------------------\n";
        file_put_contents($this->_output, $log, FILE_APPEND | LOCK_EX);
    }
603209
public function send($severity, $msg) {

        $args = array();
        if (func_num_args() > 2) {
            $args = func_get_args();
            array_shift($args);
            unset($args[0]);
        }

        $token = $this->context->get('CurrentToken', true);
        $line  = $token ? $token->line : $this->context->get('CurrentLine', true);
        $col   = $token ? $token->col  : $this->context->get('CurrentCol',  true);
        $attr  = $this->context->get('CurrentAttr', true);

        // perform special substitutions, also add custom parameters
        $subst = array();
        if (!is_null($token)) {
            $args['CurrentToken'] = $token;
        }
        if (!is_null($attr)) {
            $subst['$CurrentAttr.Name'] = $attr;
            if (isset($token->attr[$attr])) $subst['$CurrentAttr.Value'] = $token->attr[$attr];
        }

        if (empty($args)) {
            $msg = $this->locale->getMessage($msg);
        } else {
            $msg = $this->locale->formatMessage($msg, $args);
        }

        if (!empty($subst)) $msg = strtr($msg, $subst);

        // (numerically indexed)
        $error = array(
            self::LINENO   => $line,
            self::SEVERITY => $severity,
            self::MESSAGE  => $msg,
            self::CHILDREN => array()
        );
        $this->_current[] = $error;


        // NEW CODE BELOW ...

        $struct = null;
        // Top-level errors are either:
        //  TOKEN type, if $value is set appropriately, or
        //  "syntax" type, if $value is null
        $new_struct = new HTMLPurifier_ErrorStruct();
        $new_struct->type = HTMLPurifier_ErrorStruct::TOKEN;
        if ($token) $new_struct->value = clone $token;
        if (is_int($line) && is_int($col)) {
            if (isset($this->lines[$line][$col])) {
                $struct = $this->lines[$line][$col];
            } else {
                $struct = $this->lines[$line][$col] = $new_struct;
            }
            // These ksorts may present a performance problem
            ksort($this->lines[$line], SORT_NUMERIC);
        } else {
            if (isset($this->lines[-1])) {
                $struct = $this->lines[-1];
            } else {
                $struct = $this->lines[-1] = $new_struct;
            }
        }
        ksort($this->lines, SORT_NUMERIC);

        // Now, check if we need to operate on a lower structure
        if (!empty($attr)) {
            $struct = $struct->getChild(HTMLPurifier_ErrorStruct::ATTR, $attr);
            if (!$struct->value) {
                $struct->value = array($attr, 'PUT VALUE HERE');
            }
        }
        if (!empty($cssprop)) {
            $struct = $struct->getChild(HTMLPurifier_ErrorStruct::CSSPROP, $cssprop);
            if (!$struct->value) {
                // if we tokenize CSS this might be a little more difficult to do
                $struct->value = array($cssprop, 'PUT VALUE HERE');
            }
        }

        // Ok, structs are all setup, now time to register the error
        $struct->addError($severity, $msg);
    }
88401
protected function log ($msg = '', $logType = 'debug') {
		if (self::$loggingAndExceptions) {
			\MvcCore\Debug::Log($msg, $logType);
		}
	}
176951
protected function write($message, $severity)
    {
        $message = sprintf('Acumulus: %s', $message);
        Mage::log($message, $this->getMagentoSeverity($severity));
    }
388334
public function log($type, $data, $severity = 'info', $translatable = true)
    {
        $message = '';

        if (is_string($data)) {
            $message = $data;
        } elseif (isset($data['message'])) {
            $message = (string) $data['message'];
        }

        $values = array(
            'text' => $message,
            'data' => (array) $data,
            'translatable' => $translatable,
            'type' => mb_substr($type, 0, 255),
            'severity' => mb_substr($severity, 0, 255)
        );

        return $this->add($values);
    }