Trys to convert a given log-level (psr or syslog) to
the syslog representation

@param mxied
@return integer
164934
final public static function logLevelToSyslog($level)
    {
        $origLevel = $level;

        if (is_numeric($level)) {
            $level = intval($level);
            if ($level < 8 && $level > -1) {
                return $level;
            }
        } elseif (is_string($level)) {
            $level = strtolower($level);
            $syslogLevel = array_search($level, self::$psrLevels);
            if (false !== $syslogLevel) {
                return $syslogLevel;
            }
        }

        throw new RuntimeException(
            sprintf("Cannot convert log-level '%s' to syslog-style", $origLevel)
        );
    }
1309529
def getLogLevelNo(level):
    """"""
    if isinstance(level,(int,long)):
        return level
    try:
        return(int(logging.getLevelName(level.upper())))
    except:
        raise ValueError('illegal loglevel %s' % level)
481302
public static int log_2( int x ) {
		int shift;
		/* Scale x to range 1.0 <= x < 2.0 */
		shift = IBXM.FP_SHIFT;
		while( x < IBXM.FP_ONE ) {
			x <<= 1;
			shift--;
		}
		while( x >= ( IBXM.FP_ONE << 1 ) ) {
			x >>= 1;
			shift++;
		}
		return ( IBXM.FP_ONE * shift ) + eval_table( log_2_table, x - IBXM.FP_ONE );
	}
903001
public function log($level, $message, array $context = [])
    {
        // convert level to syslog level
        $syslogPriority = self::levelToPriority($level);

        syslog(
            $syslogPriority,
            $message
        );
    }
800647
private static function _getLoggerLevel1($loggerParams) {
        if (!isset(self::$loggerLevel1)) {
            $CymapgtLevel1LogDir = $loggerParams['log_dir'];
            $CymapgtLevel1Stream = new StreamHandler($CymapgtLevel1LogDir, MonologLogger::DEBUG);
            $CymapgtLevel1Logger = new MonologLogger('cymapgt_level1');
            $CymapgtLevel1Logger->pushHandler($CymapgtLevel1Stream);
            self::$loggerLevel1 = $CymapgtLevel1Logger;
        }
        return self::$loggerLevel1;
    }
1235363
public String toSyslogMessage(MessageFormat messageFormat) {
        switch (messageFormat) {
            case RFC_3164:
                return toRfc3164SyslogMessage();
            case RFC_5424:
                return toRfc5424SyslogMessage();
            case RFC_5425:
                return toRfc5425SyslogMessage();
            default:
                throw new IllegalStateException("Unsupported message format '" + messageFormat + "'");
        }
    }
597968
private int convertLevel(final JRLevel level) {
        int logbackLevel = 0;
        switch (level) {
            case Trace:
                logbackLevel = LocationAwareLogger.TRACE_INT;
                break;
            case Debug:
                logbackLevel = LocationAwareLogger.DEBUG_INT;
                break;
            case Warn:
                logbackLevel = LocationAwareLogger.WARN_INT;
                break;
            case Error:
                logbackLevel = LocationAwareLogger.ERROR_INT;
                break;
            case Info:
                logbackLevel = LocationAwareLogger.INFO_INT;
                break;
            default:
                break;
        }
        return logbackLevel;
    }
558668
public static double logpdf(double x, double mu, double sigma) {
    if(x <= 0.) {
      return Double.NEGATIVE_INFINITY;
    }
    final double xrel = (FastMath.log(x) - mu) / sigma;
    return MathUtil.LOG_ONE_BY_SQRTTWOPI - FastMath.log(sigma * x) - .5 * xrel * xrel;
  }
708636
private static ReadableLogRecord doByteByByteScanning(ByteBuffer sourceBuffer, long expectedSequenceNumber)
  {
      if (tc.isEntryEnabled()) Tr.entry(tc, "doByteByByteScanning", new Object[] {sourceBuffer, new Long(expectedSequenceNumber)});
      ReadableLogRecord logRecord = null;
      ByteBuffer viewBuffer = sourceBuffer.slice();
      
      // If there is a partial write, or a missing record, the next valid record will be at least LogRecord.HEADER_SIZE
      // forward from the current position so skip to that in the viewBuffer and start from there.
      for (int position = LogRecord.HEADER_SIZE; 
           position + LogRecord.HEADER_SIZE < viewBuffer.limit(); //  its possible we will be able to find a record in the remainder 
           position++)
      {
          viewBuffer.position(position);
          
          // Peak 2 bytes to get RC in RCRD before bothering to try parse a Record.
          // This saves stack frames and avoids some Exceptions which should help with startup times
          byte peak = viewBuffer.get(position);
          if (peak == 82) // 'R'
          {
              peak = viewBuffer.get(position + 1);
              if (peak == 67) // C - its a kinda magic, worth having a go.
              {
                  try
                  {
                      logRecord = read(viewBuffer, expectedSequenceNumber, sourceBuffer);
                      if (logRecord != null)
                          break; // we found a valid record, sourceBuffer position has been updated
                  }
                  catch (RuntimeException e)
                  {
                      // No FFDC code needed
                      // continue till the end of the loop
                  }
              }
          }
      }
      
      if (tc.isEntryEnabled()) Tr.exit(tc, "doByteByByteScanning", logRecord);
      return logRecord;
  }
484614
public int log4j_to_tango_level(Level level)
  {
   if (level.equals(Level.OFF)) {
     return LOGGING_OFF;
   }
   if (level.equals(Level.FATAL)) {
     return LOGGING_FATAL;
   }
   if (level.equals(Level.ERROR)) {
     return LOGGING_ERROR;
   }
   if (level.equals(Level.WARN)) {
     return LOGGING_WARN;
   }
   if (level.equals(Level.INFO)) {
       return LOGGING_INFO;
   }
      return LOGGING_DEBUG;
  }
126797
def get_syslog(self, service_id, version_number, name):
		""""""
		content = self._fetch("/service/%s/version/%d/syslog/%s" % (service_id, version_number, name))
		return FastlySyslog(self, content)
364002
private function getSyslogPriority(\n2n\log4php\LoggerLevel $level) {
		if($this->overridePriority) {
			return $this->intPriority;
		}
		return $level->getSyslogEquivalent();
	}
944252
public int get_logging_level(final DeviceProxy deviceProxy) throws DevFailed {
        // Get connection on administration device
        if (deviceProxy.getAdm_dev() == null) {
            import_admin_device(deviceProxy, "get_logging_level");
        }

        // Prepeare data
        final String[] target = new String[1];
        target[0] = get_name(deviceProxy);
        final DeviceData argin = new DeviceData();
        argin.insert(target);
        // And send command
        final DeviceData argout = deviceProxy.getAdm_dev().command_inout("GetLoggingLevel", argin);
        final DevVarLongStringArray lsa = argout.extractLongStringArray();
        return lsa.lvalue[0];
    }
1168983
def c_log(level, message):
    """"""
    c_level = level
    level = LEVELS_F2PY[c_level]
    logger.log(level, message)
1038369
private static Level translateLevel(final org.tinylog.Level level) {
		switch (level) {
			case TRACE:
				return Level.ALL;
			case DEBUG:
				return Level.FINER;
			case INFO:
				return Level.CONFIG;
			case WARN:
				return Level.WARNING;
			case ERROR:
				return Level.SEVERE;
			case OFF:
				return Level.OFF;
			default:
				throw new IllegalArgumentException("Unknown JUL severity level \"" + level + "\"");
		}
	}
1343289
@Deprecated
    public int getLevel() {
        Level level = loggerProxy.getLevel();
        return level != null ? level.intValue() : 0;
    }
275262
def format_graylog_v0(self, record):
        '''
        
        '''
        message_dict = {
            'message': record.getMessage(),
            'timestamp': self.formatTime(record),
            # Graylog uses syslog levels, not whatever it is Python does...
            'level': syslog_levels.get(record.levelname, 'ALERT'),
            'tag': self.tag
        }

        if record.exc_info:
            exc_info = self.formatException(record.exc_info)
            message_dict.update({'full_message': exc_info})

        # Add any extra attributes to the message field
        for key, value in six.iteritems(record.__dict__):
            if key in ('args', 'asctime', 'bracketlevel', 'bracketname', 'bracketprocess',
                       'created', 'exc_info', 'exc_text', 'id', 'levelname', 'levelno', 'msecs',
                       'msecs', 'message', 'msg', 'relativeCreated', 'version'):
                # These are already handled above or explicitly pruned.
                continue

            if isinstance(value, (six.string_types, bool, dict, float, int, list, types.NoneType)):  # pylint: disable=W1699
                val = value
            else:
                val = repr(value)
            message_dict.update({'{0}'.format(key): val})
        return message_dict