PWLogger Class Reference
Inherits from | NSObject |
---|---|
Declared in | PWLogger.h |
+ consoleLoggingEnabled:forService:
Enables or disables console logging for the service.
+ (void)consoleLoggingEnabled:(BOOL)enabled forService:(NSString *)serviceName
Parameters
enabled |
Enable or disable to the console logger. |
---|---|
serviceName |
Service to log |
Declared In
PWLogger.h
+ fileLoggingEnabled:forService:
Enables or disables file logging for the service.
+ (void)fileLoggingEnabled:(BOOL)enabled forService:(NSString *)serviceName
Parameters
enabled |
Enable or disable to the file logger. |
---|---|
serviceName |
Service to log |
Declared In
PWLogger.h
+ logForService:message:type:file:function:line:dictionary:
Logs a message using all the loggers added to the logging module.
+ (void)logForService:(NSString *)serviceName message:(NSString *)message type:(PWLogType)type file:(const char *)file function:(const char *)function line:(NSUInteger)line dictionary:(NSDictionary *)dictionary
Parameters
serviceName |
The service name that corresponds to the message. Only loggers with the same service name will receive the message. |
---|---|
message |
The main message content of the log message. |
type |
The type of the message. Only loggers with a base level equal or below the message type will proceed log the message. See the ‘PWLogType’ and ‘PWLogLevel’ enums. |
file |
The file where the message was logged. |
function |
The function from where the message was logged. |
line |
The line number inside the file where the message was logged. |
dictionary |
A dictionary of values to store in the log. |
Declared In
PWLogger.h
+ addLogger:
Adds a logger to the logging module.
+ (void)addLogger:(id<PWLogger>)logger
Parameters
logger |
The logger to add. It must implement the PWLogger. |
---|
Declared In
PWLogger.h
+ removeLogger:
Removes a logger from the logging module
+ (void)removeLogger:(id<PWLogger>)logger
Parameters
logger |
The logger to remove. |
---|
Declared In
PWLogger.h
+ setLoggersLogLevel:
Sets all the loggers log level.
+ (void)setLoggersLogLevel:(PWLogLevel)logLevel
Parameters
logLevel |
The log level to log. |
---|
Declared In
PWLogger.h
+ setLoggersLogLevel:forService:
Sets all the loggers log level for a service.
+ (void)setLoggersLogLevel:(PWLogLevel)logLevel forService:(NSString *)serviceName
Parameters
logLevel |
The log level to log. |
---|---|
serviceName |
The service to set the log level on. |
Declared In
PWLogger.h
+ setLogInternalError:
Enables or disables logging internal errors.
+ (void)setLogInternalError:(BOOL)logInternalErrors
Parameters
logInternalErrors |
A BOOL value that indicates whether internal errors should be logged. |
---|
Declared In
PWLogger.h
+ emailLogs
Displays MFMailComposeViewController to email logs.
+ (void)emailLogs
Declared In
PWLogger.h
+ emailLogsForService:
Displays MFMailComposeViewController to email logs.
+ (void)emailLogsForService:(NSString *)serviceName
Parameters
serviceName |
The service to send the logs for. |
---|
Declared In
PWLogger.h