Class DefaultKeyProvider
java.lang.Object
com.github.palindromicity.syslog.DefaultKeyProvider
- All Implemented Interfaces:
KeyProvider
Default implementation of
KeyProvider.
This implementation uses the SyslogFieldKeys for values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProvides the key name for the HEADER APP-NAME @see Section 6.2.5.Provides the key name for the Facility from the HEADER PRI @see Section 6.2.1.Provides the key name for the HEADER HOSTNAME @see Section 6.2.4.Provides the key name for the HEADER MSGID @see Section 6.2.7.Provides the key name for the HEADER PRI @see Section 6.2.1.Provides the key name for the HEADER PROCID @see Section 6.2.6.Provides the key name for the Severity from the HEADER PRI @see Section 6.2.1.Provides the key name for the HEADER TIMESTAMP @see Section 6.2.3.Provides the key name for the HEADER VERSION @see Section 6.2.2.Provides the key name for the MSG @see Section 6.4.The base String used for all STRUCTURED_DATA keys.Provides aString.formatStringfor producing key name for the STRUCTURED_DATA SD-ID @see Section 6.3.2.Provides aString.formatStringfor producing key name for the STRUCTURED_DATA SD-PARAM @see Section 6.3.3.ProvidesPatternthat will match and capture the SD-ID and SD-PARAM PARAM-NAME as defined in the return fromKeyProvider.getStructuredElementIdParamNameFormat().
-
Constructor Details
-
DefaultKeyProvider
public DefaultKeyProvider()
-
-
Method Details
-
getMessage
Description copied from interface:KeyProviderProvides the key name for the MSG @see Section 6.4.- Specified by:
getMessagein interfaceKeyProvider- Returns:
- MSG key name
-
getHeaderAppName
Description copied from interface:KeyProviderProvides the key name for the HEADER APP-NAME @see Section 6.2.5.- Specified by:
getHeaderAppNamein interfaceKeyProvider- Returns:
- APP-NAME key name
-
getHeaderHostName
Description copied from interface:KeyProviderProvides the key name for the HEADER HOSTNAME @see Section 6.2.4.- Specified by:
getHeaderHostNamein interfaceKeyProvider- Returns:
- HOSTNAME key name
-
getHeaderPriority
Description copied from interface:KeyProviderProvides the key name for the HEADER PRI @see Section 6.2.1.- Specified by:
getHeaderPriorityin interfaceKeyProvider- Returns:
- PRI key name
-
getHeaderSeverity
Description copied from interface:KeyProviderProvides the key name for the Severity from the HEADER PRI @see Section 6.2.1.- Specified by:
getHeaderSeverityin interfaceKeyProvider- Returns:
- PRI key name
-
getHeaderFacility
Description copied from interface:KeyProviderProvides the key name for the Facility from the HEADER PRI @see Section 6.2.1.- Specified by:
getHeaderFacilityin interfaceKeyProvider- Returns:
- PRI key name
-
getHeaderProcessId
Description copied from interface:KeyProviderProvides the key name for the HEADER PROCID @see Section 6.2.6.- Specified by:
getHeaderProcessIdin interfaceKeyProvider- Returns:
- PROCID key name
-
getHeaderTimeStamp
Description copied from interface:KeyProviderProvides the key name for the HEADER TIMESTAMP @see Section 6.2.3.- Specified by:
getHeaderTimeStampin interfaceKeyProvider- Returns:
- TIMESTAMP key name
-
getHeaderMessageId
Description copied from interface:KeyProviderProvides the key name for the HEADER MSGID @see Section 6.2.7.- Specified by:
getHeaderMessageIdin interfaceKeyProvider- Returns:
- MSGID key name
-
getHeaderVersion
Description copied from interface:KeyProviderProvides the key name for the HEADER VERSION @see Section 6.2.2.- Specified by:
getHeaderVersionin interfaceKeyProvider- Returns:
- VERSION key name
-
getStructuredBase
Description copied from interface:KeyProviderThe base String used for all STRUCTURED_DATA keys.syslog.structuredData.for example. This can be useful to find all STRUCTURED_DATA keys- Specified by:
getStructuredBasein interfaceKeyProvider- Returns:
- STRUCTURED_DATA base key name
- See Also:
-
getStructuredElementIdFormat
Description copied from interface:KeyProviderProvides aString.formatStringfor producing key name for the STRUCTURED_DATA SD-ID @see Section 6.3.2. The formatStringsupports one parameter%sthat will be passed the SD-ID value. The format must begin with the value returned fromKeyProvider.getStructuredBase()For example:syslog.structuredData.%s- Specified by:
getStructuredElementIdFormatin interfaceKeyProvider- Returns:
- SD-ID format String
-
getStructuredElementIdParamNameFormat
Description copied from interface:KeyProviderProvides aString.formatStringfor producing key name for the STRUCTURED_DATA SD-PARAM @see Section 6.3.3. The formatStringsupports two parameters%sthat will be passed the SD-ID value and the SD-PARAM PARAM-NAME. The format must begin with the value returned fromKeyProvider.getStructuredBase()For example:syslog.structuredData.%s.%s- Specified by:
getStructuredElementIdParamNameFormatin interfaceKeyProvider- Returns:
- SD-PARAM format String
-
getStructuredElementIdParamNamePattern
Description copied from interface:KeyProviderProvidesPatternthat will match and capture the SD-ID and SD-PARAM PARAM-NAME as defined in the return fromKeyProvider.getStructuredElementIdParamNameFormat().- Specified by:
getStructuredElementIdParamNamePatternin interfaceKeyProvider- Returns:
Pattern
-