- java.lang.Object
-
- java.lang.Enum<SupportedLogType>
-
- com.pervasive.datarush.operators.io.textfile.SupportedLogType
-
- All Implemented Interfaces:
Serializable
,Comparable<SupportedLogType>
public enum SupportedLogType extends Enum<SupportedLogType>
Enumerated type that provides factory constructors for the supported log formats.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLF
The Common Log Format can be used when reading web server logs in CLF.COMBINED
The Combined Log format can be used when reading web server logs in combined log format.CUSTOM
A Null Type that can be used when implementing custom log formats.ELF
The Extended Log Format can be used when reading web server logs in ELF.GENERIC
A generic type for non-specific log data that can be parsed using a regular expression.GLASSFISH
The Glassfish log format can be used when reading Glassfish server logs.LOG4J
The Log4J format can be used to read Apache Log4J logs.SYSLOG
The Syslog format can be used to read logs produced by syslogd and other BSD syslog producers.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description LogFormat
getDefaultLogFormat()
String
getDefaultPattern()
abstract LogFormat
getLogFormat(String formatPattern)
boolean
supportsFormatDiscovery()
String
toString()
static SupportedLogType
valueOf(String name)
Returns the enum constant of this type with the specified name.static SupportedLogType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CUSTOM
public static final SupportedLogType CUSTOM
A Null Type that can be used when implementing custom log formats.
-
GENERIC
public static final SupportedLogType GENERIC
A generic type for non-specific log data that can be parsed using a regular expression. This should be used only when there isn't a more specific log type available. The generic log format takes a valid Java regular expression string as the format pattern. The grouping of the regular expression defines the fields the individual records will be split into.
-
CLF
public static final SupportedLogType CLF
The Common Log Format can be used when reading web server logs in CLF. Since CLF is well defined it does not require a format pattern be specified.
-
COMBINED
public static final SupportedLogType COMBINED
The Combined Log format can be used when reading web server logs in combined log format. The combined log format uses the string true or false for the format pattern, determining if the optional cookie field is included in the log.
-
ELF
public static final SupportedLogType ELF
The Extended Log Format can be used when reading web server logs in ELF. ELF takes a format string in the same form as a Fields directive as specified in the official format. If format discovery is enabled it will scan the file for any directives and apply them appropriately.
-
GLASSFISH
public static final SupportedLogType GLASSFISH
The Glassfish log format can be used when reading Glassfish server logs. The Glassfish format takes a format string specifying the date fomrat used in the timestamps of the log. Any string supported by Java DateFormat is acceptable.
-
LOG4J
public static final SupportedLogType LOG4J
The Log4J format can be used to read Apache Log4J logs. The Log4J format takes a format string in the same form as the Log4J conversion pattern that specified the log.
-
SYSLOG
public static final SupportedLogType SYSLOG
The Syslog format can be used to read logs produced by syslogd and other BSD syslog producers. The Syslog format takes a format string specifying the current four-digit year and the signed four-digit offset from UTC for the timezone separated by a space.
-
-
Method Detail
-
values
public static SupportedLogType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SupportedLogType c : SupportedLogType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SupportedLogType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getDefaultPattern
public String getDefaultPattern()
-
supportsFormatDiscovery
public boolean supportsFormatDiscovery()
-
toString
public String toString()
- Overrides:
toString
in classEnum<SupportedLogType>
-
getDefaultLogFormat
public LogFormat getDefaultLogFormat()
-
-