Logger APIs

Use the Logger API to set the log level and create log records on the client.

Each package has a Logger. To obtain the package logger, use the getLogger method in the generated database class. The Logger is an abstraction over the LogRecord API to write records of various log levels into the LogRecord MBO on the client database.
 // Retrieve SUPLogger from the database class
SUPLogger logger = [SMP101DB getLogger];

// Set the log level for the logger
// Application can use getLogLevel to determine the current log level setting for the Logger
[logger setLogLevel:[SMPLogLevel DEBUG]];

// create a log record at DEBUG level
[logger debug:@"Some debug message"];

// Prepare all outstanding client generated log records for upload
[logger submitLogRecords];