log static method

Future<void> log({
  1. required String message,
  2. LogLevel logLevel = LogLevel.INFO,
})

log

Custom logs allow you to create logs in the Gleap activity log. There are three severnity types available for logs: ERROR, WARNING and INFO.

Available Platforms

Web, Android, iOS

Implementation

static Future<void> log({
  required String message,
  LogLevel logLevel = LogLevel.INFO,
}) async {
  if (!kIsWeb && !io.Platform.isAndroid && !io.Platform.isIOS) {
    debugPrint(
      'log is not available for current operating system',
    );
    return;
  }

  String preparedSevernity = _getLogSevernityValue(logLevel);

  await _channel.invokeMethod(
    'log',
    {
      'message': message,
      'logLevel': preparedSevernity,
    },
  );
}