Class SyslogUtils


  • public abstract class SyslogUtils
    extends java.lang.Object
    • Constructor Detail

      • SyslogUtils

        public SyslogUtils()
    • Method Detail

      • createNorthboundInstance

        public static void createNorthboundInstance​(SyslogDestination destination)
                                             throws org.graylog2.syslog4j.SyslogRuntimeException
        Creates the northbound instance.
        Parameters:
        destination - the destination
        Throws:
        org.graylog2.syslog4j.SyslogRuntimeException - the syslog runtime exception
      • createConfig

        public static org.graylog2.syslog4j.SyslogConfigIF createConfig​(SyslogDestination dest,
                                                                        SyslogDestination.SyslogProtocol protocol,
                                                                        int fac)
        Creates the Syslog configuration object.
        Parameters:
        dest - the destination
        protocol - the protocol
        fac - the facility
        Returns:
        the SyslogConfigIf object
      • convertFacility

        public static int convertFacility​(SyslogDestination.SyslogFacility facility)
        Convert facility.
        Parameters:
        facility - the facility
        Returns:
        the integer version of the facility
      • determineLogLevel

        public static int determineLogLevel​(OnmsSeverity severity)
        Determine log level.
        Parameters:
        severity - the severity
        Returns:
        the integer version of the severity