FMLiveSwitchLogStashLogProvider Class Reference

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

Instance Methods

(NSString *) - address
 Gets the LogStash server address. More...
 
(void) - doLogWithLogEvent:
 Logs a message at the specified log level. More...
 
(instancetype) - initWithAddress:port:useSSL:
 Creates a new instance of a LogStash log provider using defaultLogLevel (FMLiveSwitchLog) as log level. More...
 
(instancetype) - initWithAddress:port:useSSL:level:
 Creates a new instance of a LogStash log provider. More...
 
(int) - port
 Gets the LogStash server port. More...
 
- Instance Methods inherited from FMLiveSwitchLogProvider
(FMLiveSwitchFunction1< FMLiveSwitchLogEvent *, id > *) - filter
 Gets a filter on the log provider. More...
 
(NSString *) - generateLogLineWithLogEvent:
 Generates a default log line. More...
 
(NSString *) - getPrefixWithLevel:includeTimestamp:
 Converts a log-level to a 5-character string for consistently-spaced character sequences. More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchLogProvider class using defaultLogLevel (FMLiveSwitchLog) as the log level. More...
 
(FMLiveSwitchLogLevel) - level
 Gets the log level. More...
 
(void) - logWithLogEvent:
 Log a message. More...
 
(int) - processId
 Gets the current process id. More...
 
(void) - setFilter:
 Sets a filter on the log provider. More...
 
(FMLiveSwitchLogEvent *) - setFilterBlock
 Sets a filter on the log provider. More...
 
(void) - setFilterBlock:
 Sets a filter on the log provider. More...
 
(void) - setLevel:
 Sets the log level. More...
 

Class Methods

(FMLiveSwitchLogStashLogProvider *) + logStashLogProviderWithAddress:port:useSSL:
 Creates a new instance of a LogStash log provider using defaultLogLevel (FMLiveSwitchLog) as log level. More...
 
(FMLiveSwitchLogStashLogProvider *) + logStashLogProviderWithAddress:port:useSSL:level:
 Creates a new instance of a LogStash log provider. More...
 
- Class Methods inherited from FMLiveSwitchLogProvider
(NSString *) + getLogLevelStringWithLevel:
 Converts a log-level to a 5-character string for consistently-spaced character sequences. More...
 
(NSString *) + getPrefixTimestamp:
 Converts a timestamp to an ISO-8601-formatted string for rendering in a log message (YYYY-MM-DDThh:mm:ss.sssZ). More...
 
(NSString *) + getProduct
 Returns the name of the current product. More...
 
(FMLiveSwitchLogProvider *) + logProvider
 Initializes a new instance of the FMLiveSwitchLogProvider class using defaultLogLevel (FMLiveSwitchLog) as the log level. More...
 

Detailed Description

A log provider that sends logs to LogStash.

Method Documentation

◆ address

- (NSString*) address

Gets the LogStash server address.

◆ doLogWithLogEvent:

- (void) doLogWithLogEvent: (FMLiveSwitchLogEvent *)  logEvent

Logs a message at the specified log level.

Parameters
logEventThe log event details.

Implements FMLiveSwitchLogProvider.

◆ initWithAddress:port:useSSL:

- (instancetype) initWithAddress: (NSString *)  address
port: (int)  port
useSSL: (bool)  useSSL 

Creates a new instance of a LogStash log provider using defaultLogLevel (FMLiveSwitchLog) as log level.

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

◆ initWithAddress:port:useSSL:level:

- (instancetype) initWithAddress: (NSString *)  address
port: (int)  port
useSSL: (bool)  useSSL
level: (FMLiveSwitchLogLevel)  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.

◆ logStashLogProviderWithAddress:port:useSSL:

+ (FMLiveSwitchLogStashLogProvider*) logStashLogProviderWithAddress: (NSString *)  address
port: (int)  port
useSSL: (bool)  useSSL 

Creates a new instance of a LogStash log provider using defaultLogLevel (FMLiveSwitchLog) as log level.

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

◆ logStashLogProviderWithAddress:port:useSSL:level:

+ (FMLiveSwitchLogStashLogProvider*) logStashLogProviderWithAddress: (NSString *)  address
port: (int)  port
useSSL: (bool)  useSSL
level: (FMLiveSwitchLogLevel)  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.

◆ port

- (int) port

Gets the LogStash server port.