update web log writer
This commit is contained in:
parent
6fdb73ba62
commit
4bea5870f3
3 changed files with 19 additions and 6 deletions
|
|
@ -100,7 +100,7 @@ class Log {
|
|||
|
||||
void initializeLog() async {
|
||||
if (path == null) {
|
||||
path = await Path.dataPath;
|
||||
path = Path.dataPath;
|
||||
if (path!.isNotEmpty) {
|
||||
path = '$path/logs';
|
||||
var dir = Directory(path!);
|
||||
|
|
|
|||
|
|
@ -61,4 +61,4 @@ class LogWriterIO extends IsolateBase implements LogWriter {
|
|||
}
|
||||
}
|
||||
|
||||
LogWriter getLogWriter() => LogWriterIO();
|
||||
LogWriter getLogWriter() => LogWriterIO();
|
||||
|
|
@ -1,7 +1,20 @@
|
|||
import 'package:dart_framework/data/isolate_data.dart';
|
||||
import 'package:dart_framework/platform/platform_base.dart';
|
||||
|
||||
void startLog(String path, Function(IsoMessege) listener) {}
|
||||
class LogWriterWeb implements LogWriter {
|
||||
@override
|
||||
void start(String path, Map<String, void Function(Object?)> messageListenerMap) {
|
||||
|
||||
void writeLog(String log) {}
|
||||
}
|
||||
|
||||
void endLog() {}
|
||||
@override
|
||||
void write(String log) {
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
void end() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
LogWriter getLogWriter() => LogWriterWeb();
|
||||
Loading…
Reference in a new issue