log static method

void log({
  1. required GemDumpSdkLevel level,
  2. String module = 'Application',
  3. String function = '',
  4. String file = '',
  5. int line = 0,
  6. required String message,
})

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:

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,
  );
}