log static method
void
log({})
Writes a log message to the SDK logging system for crash analysis.
Logs are automatically written to a file accessible via getSdkLogDumpPath and sent to Magic Lane servers in case of crashes. Use setSdkDumpLevel to control the verbosity of logs included in crash reports.
Parameters
level: Severity level of the log message.module: Module name where the log originates. Defaults to 'Application'.function: Function name where the log is issued.file: Source file name where the log is issued.line: Line number in the source file. Defaults to 0.message: Log message content. Should not contain format specifiers.
See also:
- getSdkLogDumpPath - For retrieving the log file path.
- setSdkDumpLevel - For configuring log verbosity.
- GemDumpSdkLevel - For available log severity levels.
Implementation
static void log({
required GemDumpSdkLevel level,
String module = 'Application',
String function = '',
String file = '',
int line = 0,
required String message,
}) {
staticMethod(
'Debug',
'log',
args: <String, Object>{
'level': level.id,
'pszModule': module,
'pszFunction': function,
'pszFile': file,
'line': line,
'str': message,
},
logPrivacyLevel: LogPrivacyLevel.noLog,
);
}