mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 23:57:54 +00:00
20 lines
365 B
Dart
20 lines
365 B
Dart
import 'dart:io';
|
|
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:logger/logger.dart';
|
|
|
|
import 'util.dart';
|
|
|
|
final logger = Logger(
|
|
printer: PrettyPrinter(),
|
|
output: buildOutput(),
|
|
);
|
|
|
|
buildOutput() {
|
|
// if is debug mode, output to console
|
|
if (!kDebugMode && Util.isDesktop()) {
|
|
return FileOutput(file: File('log.txt'));
|
|
}
|
|
return null;
|
|
}
|