FMLiveSwitchLogEventLogProvider Class Reference

Simple log provider that writes log events to a local array. More...

Instance Methods

(NSMutableArray *) - clear
 Clears all text from the log and returns the former contents. More...
 
(void) - doLogWithLogEvent:
 Logs a message at the specified log level. More...
 
(NSMutableArray *) - events
 Gets the logged events. More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchLogEventLogProvider. More...
 
(instancetype) - initWithLevel:
 Initializes a new instance of the FMLiveSwitchLogEventLogProvider class. 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...
 
(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

(FMLiveSwitchLogEventLogProvider *) + logEventLogProvider
 Initializes a new instance of the FMLiveSwitchLogEventLogProvider. More...
 
(FMLiveSwitchLogEventLogProvider *) + logEventLogProviderWithLevel:
 Initializes a new instance of the FMLiveSwitchLogEventLogProvider class. 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

Simple log provider that writes log events to a local array.

Method Documentation

◆ clear

- (NSMutableArray*) clear

Clears all text from the log and returns the former contents.

◆ doLogWithLogEvent:

- (void) doLogWithLogEvent: (FMLiveSwitchLogEvent *)  logEvent

Logs a message at the specified log level.

Parameters
logEventThe log event details.

Implements FMLiveSwitchLogProvider.

◆ events

- (NSMutableArray*) events

Gets the logged events.

◆ init

- (instancetype) init

Initializes a new instance of the FMLiveSwitchLogEventLogProvider.

Implements FMLiveSwitchLogProvider.

◆ initWithLevel:

- (instancetype) initWithLevel: (FMLiveSwitchLogLevel)  level

Initializes a new instance of the FMLiveSwitchLogEventLogProvider class.

Parameters
levelThe log level.

◆ logEventLogProvider

+ (FMLiveSwitchLogEventLogProvider*) logEventLogProvider

Initializes a new instance of the FMLiveSwitchLogEventLogProvider.

◆ logEventLogProviderWithLevel:

+ (FMLiveSwitchLogEventLogProvider*) logEventLogProviderWithLevel: (FMLiveSwitchLogLevel)  level

Initializes a new instance of the FMLiveSwitchLogEventLogProvider class.

Parameters
levelThe log level.