mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: lint
mod: tweaks opt: publish page Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
// final _loggerFactory =
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -17,7 +15,7 @@ class PiliLogger extends Logger {
|
||||
PiliLogger() : super();
|
||||
|
||||
@override
|
||||
void log(Level level, dynamic message,
|
||||
Future<void> log(Level level, dynamic message,
|
||||
{Object? error, StackTrace? stackTrace, DateTime? time}) async {
|
||||
if (level == Level.error || level == Level.fatal) {
|
||||
// 添加至文件末尾
|
||||
@@ -35,7 +33,7 @@ Future<File> getLogsPath() async {
|
||||
String dir = (await getApplicationDocumentsDirectory()).path;
|
||||
final String filename = p.join(dir, ".pili_logs");
|
||||
final File file = File(filename);
|
||||
if (!await file.exists()) {
|
||||
if (!file.existsSync()) {
|
||||
await file.create(recursive: true);
|
||||
}
|
||||
return file;
|
||||
|
||||
Reference in New Issue
Block a user