浏览代码

Remove logging util

Vishnu Mohandas 4 年之前
父节点
当前提交
32087f79d1
共有 1 个文件被更改,包括 0 次插入36 次删除
  1. 0 36
      lib/utils/logging_util.dart

+ 0 - 36
lib/utils/logging_util.dart

@@ -1,36 +0,0 @@
-import 'dart:io';
-
-import 'package:archive/archive_io.dart';
-import 'package:flutter_email_sender/flutter_email_sender.dart';
-import 'package:path_provider/path_provider.dart';
-
-class LoggingUtil {
-  LoggingUtil._privateConstructor();
-
-  static final LoggingUtil instance = LoggingUtil._privateConstructor();
-
-  bool _isInProgress = false;
-  Future<void> emailLogs() async {
-    if (_isInProgress) {
-      return;
-    }
-    _isInProgress = true;
-    final tempPath = (await getTemporaryDirectory()).path;
-    final zipFilePath = tempPath + "/logs.zip";
-    Directory logsDirectory = Directory(tempPath + "/logs");
-    var encoder = ZipFileEncoder();
-    encoder.create(zipFilePath);
-    encoder.addDirectory(logsDirectory);
-    encoder.close();
-    final Email email = Email(
-      body: 'Logs attached.',
-      subject: 'Error, error, share the terror.',
-      recipients: ['android-support@ente.io'],
-      cc: ['vishnumohandas@gmail.com'],
-      attachmentPaths: [zipFilePath],
-      isHTML: false,
-    );
-    await FlutterEmailSender.send(email);
-    _isInProgress = false;
-  }
-}