mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-17 13:53:41 +00:00
feat: support custom tracker url (#59)
This commit is contained in:
1 parent
9ef3405e43
commit
691c2f496e
71 files changed
+2209
-891
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logger/logger.dart';
|
||||
import 'package:logger/src/outputs/file_output.dart';
|
||||
|
||||
@@ -7,5 +8,13 @@ import 'util.dart';
|
||||
|
||||
final logger = Logger(
|
||||
printer: PrettyPrinter(),
|
||||
output: Util.isDesktop() ? FileOutput(file: File('log.txt')) : null,
|
||||
output: buildOutput(),
|
||||
);
|
||||
|
||||
buildOutput() {
|
||||
// if is debug mode, output to console
|
||||
if (!kDebugMode && Util.isDesktop()) {
|
||||
return FileOutput(file: File('log.txt'));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
Reference in new issue
Block a user