mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 18:10:29 +00:00
Merge remote-tracking branch 'origin/main' into codex/async-ffi-worker-callbacks
This commit is contained in:
commit
f7be97667f
4 files changed
+40
-4
No files matched your search
@@ -19,14 +19,15 @@ String logsDir() {
|
||||
return path.join(Util.getStorageDir(), 'logs');
|
||||
}
|
||||
|
||||
Directory ensureLogDirectory(String logDirPath) {
|
||||
return Directory(logDirPath)..createSync(recursive: true);
|
||||
}
|
||||
|
||||
LogOutput? _buildOutput() {
|
||||
// if is debug mode, don't log to file
|
||||
if (!kDebugMode && Util.isDesktop()) {
|
||||
final logDirPath = logsDir();
|
||||
var logDir = Directory(logsDir());
|
||||
if (!logDir.existsSync()) {
|
||||
logDir.createSync();
|
||||
}
|
||||
ensureLogDirectory(logDirPath);
|
||||
return FileOutput(file: File('$logDirPath/client.log'));
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user