logOnOsLog method

  1. @override
Future<void> logOnOsLog({
  1. required String message,
  2. required String level,
  3. required String category,
})
override

Logs message using os_log, on category.

The OSLogType of the log depends on level as follow:

  • 'CONFIG' and 'INFO': OSLogType.info;
  • 'WARNING': OSLogType.error;
  • 'SEVERE' and 'SHOUT': OSLogType.fault;
  • others: OSLogType.debug.

Implementation

@override
Future<void> logOnOsLog({
  required String message,
  required String level,
  required String category,
}) async {
  await methodChannel.invokeMethod<void>('osLog', {
    'message': message,
    'level': level,
    'category': category,
  });
}