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.
Logger logger = SMP101DB.GetLogger();

// set log level to debug
logger.LogLevel = LogLevel.DEBUG;

// create a log record with ERROR level and the error message.
logger.Error("Some error message");

// Prepare all outstanding client generated log records for upload
SMP101DB.SubmitLogRecords();