fm.liveswitch.LogStashLogProvider Class Reference

A log provider that sends logs to LogStash. More...

Public Member Functions

String getAddress ()
 Gets the LogStash server address. More...
 
int getPort ()
 Gets the LogStash server port. More...
 
 LogStashLogProvider (String address, int port, boolean useSSL)
 Creates a new instance of a LogStash log provider using fm.liveswitch.Log#getDefaultLogLevel as log level. More...
 
 LogStashLogProvider (String address, int port, boolean useSSL, fm.liveswitch.LogLevel level)
 Creates a new instance of a LogStash log provider. More...
 
- Public Member Functions inherited from fm.liveswitch.LogProvider
fm.liveswitch.IFunction1< fm.liveswitch.LogEvent, Boolean > getFilter ()
 Gets a filter on the log provider. More...
 
fm.liveswitch.LogLevel getLevel ()
 Gets the log level. More...
 
void log (fm.liveswitch.LogEvent logEvent)
 Log a message. More...
 
 LogProvider ()
 Initializes a new instance of the fm.liveswitch.LogProvider class using fm.liveswitch.Log#getDefaultLogLevel as the log level. More...
 
void setFilter (fm.liveswitch.IFunction1< fm.liveswitch.LogEvent, Boolean > value)
 Sets a filter on the log provider. More...
 
void setLevel (fm.liveswitch.LogLevel value)
 Sets the log level. More...
 

Protected Member Functions

void doLog (fm.liveswitch.LogEvent logEvent)
 Logs a message at the specified log level. More...
 
- Protected Member Functions inherited from fm.liveswitch.LogProvider
String generateLogLine (fm.liveswitch.LogEvent logEvent)
 Generates a default log line. More...
 
String getPrefix (fm.liveswitch.LogLevel level, boolean includeTimestamp)
 Converts a log-level to a 5-character string for consistently-spaced character sequences. More...
 
int getProcessId ()
 Gets the current process id. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from fm.liveswitch.LogProvider
static String getLogLevelString (fm.liveswitch.LogLevel level)
 Converts a log-level to a 5-character string for consistently-spaced character sequences. More...
 
static String getPrefixTimestamp (java.util.Date timestamp)
 Converts a timestamp to an ISO-8601-formatted string for rendering in a log message (YYYY-MM-DDThh:mm:ss.sssZ). More...
 
static String getProduct ()
 Returns the name of the current product. More...
 

Detailed Description

A log provider that sends logs to LogStash.

Constructor & Destructor Documentation

◆ LogStashLogProvider() [1/2]

fm.liveswitch.LogStashLogProvider.LogStashLogProvider ( String  address,
int  port,
boolean  useSSL 
)

Creates a new instance of a LogStash log provider using fm.liveswitch.Log#getDefaultLogLevel as log level.

Parameters
addressThe LogStash server address.
portThe LogStash server port.
useSSLWhether to use SSL/TLS when connecting to the LogStash server.

◆ LogStashLogProvider() [2/2]

fm.liveswitch.LogStashLogProvider.LogStashLogProvider ( String  address,
int  port,
boolean  useSSL,
fm.liveswitch.LogLevel  level 
)

Creates a new instance of a LogStash log provider.

Parameters
addressThe address of LogStash.
portThe port of LogStash.
useSSLWhether to use SSL/TLS when connecting to the LogStash server.
levelThe initial log level.

Member Function Documentation

◆ doLog()

void fm.liveswitch.LogStashLogProvider.doLog ( fm.liveswitch.LogEvent  logEvent)
protected

Logs a message at the specified log level.

Parameters
logEventThe log event details.

Reimplemented from fm.liveswitch.LogProvider.

◆ getAddress()

String fm.liveswitch.LogStashLogProvider.getAddress ( )

Gets the LogStash server address.

◆ getPort()

int fm.liveswitch.LogStashLogProvider.getPort ( )

Gets the LogStash server port.