Class SyslogUtils
- java.lang.Object
-
- org.opennms.netmgt.alarmd.northbounder.syslog.SyslogUtils
-
public abstract class SyslogUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SyslogUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
convertFacility(SyslogDestination.SyslogFacility facility)
Convert facility.static org.graylog2.syslog4j.SyslogConfigIF
createConfig(SyslogDestination dest, SyslogDestination.SyslogProtocol protocol, int fac)
Creates the Syslog configuration object.static void
createNorthboundInstance(SyslogDestination destination)
Creates the northbound instance.static int
determineLogLevel(OnmsSeverity severity)
Determine log level.
-
-
-
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 destinationprotocol
- the protocolfac
- 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
-
-