<commit_before>import 'package:flutter/services.dart';
import 'package:logging/logging.dart';

final _log = Logger('android.logger');

class AndroidLogger {
  final MethodChannel _channel = const MethodChannel('android.log.redirect');

  AndroidLogger() {
    Logger.root.onRecord.listen((record) {
      if (record.level >= Logger.root.level) {
        log(record);
      }
    });
    _log.info('Logging initialized, outputting to Android/logcat');
  }

  void setLogLevel(Level level) async {
    await _channel.invokeMethod('setLevel', {
      'level': level.name,
    });
  }

  void log(LogRecord record) async {
    await _channel.invokeMethod('log', {
      'loggerName': record.loggerName,
      'level': record.level.name,
      'message': record.message,
      'error': record.error
    });<commit_msg>remove await from logger calls<commit_after>import 'package:flutter/services.dart';
import 'package:logging/logging.dart';

final _log = Logger('android.logger');

class AndroidLogger {
  final MethodChannel _channel = const MethodChannel('android.log.redirect');

  AndroidLogger() {
    Logger.root.onRecord.listen((record) {
      if (record.level >= Logger.root.level) {
        log(record);
      }
    });
    _log.info('Logging initialized, outputting to Android/logcat');
  }

  void setLogLevel(Level level) {
    _channel.invokeMethod('setLevel', {
      'level': level.name,
    });
  }

  void log(LogRecord record) {
    _channel.invokeMethod('log', {
      'loggerName': record.loggerName,
      'level': record.level.name,
      'message': record.message,
      'error': record.error
    });
{'fraction_non_alphanumeric': 0.14206300185299567, 'fraction_numerical': 0.0, 'mean_word_length': 3.4628099173553717, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5967304', 'n_tokens_mistral': 491, 'n_tokens_neox': 486, 'n_words': 94}