mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-24 02:18:50 +01:00
Add log
This commit is contained in:
parent
50d38d374e
commit
fcdb3a6275
3 changed files with 12 additions and 8 deletions
|
@ -3,8 +3,8 @@ import 'dart:convert';
|
|||
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/stream_extension.dart';
|
||||
import 'package:np_codegen/np_codegen.dart';
|
||||
import 'package:np_platform_message_relay/np_platform_message_relay.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'native_event.g.dart';
|
||||
|
||||
|
@ -47,7 +47,7 @@ class NativeEventListener<T> {
|
|||
Logger("event.native_event.NativeEventListener<${T.runtimeType}>");
|
||||
}
|
||||
|
||||
@npLog
|
||||
@toString
|
||||
class FileExifUpdatedEvent {
|
||||
const FileExifUpdatedEvent(this.fileIds);
|
||||
|
||||
|
@ -65,6 +65,9 @@ class FileExifUpdatedEvent {
|
|||
}),
|
||||
);
|
||||
|
||||
@override
|
||||
String toString() => _$toString();
|
||||
|
||||
static const id = "FileExifUpdatedEvent";
|
||||
|
||||
final List<int> fileIds;
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
part of 'native_event.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// NpLogGenerator
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$FileExifUpdatedEventNpLog on FileExifUpdatedEvent {
|
||||
// ignore: unused_element
|
||||
Logger get _log => log;
|
||||
|
||||
static final log = Logger("event.native_event.FileExifUpdatedEvent");
|
||||
extension _$FileExifUpdatedEventToString on FileExifUpdatedEvent {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "FileExifUpdatedEvent {fileIds: [length: ${fileIds.length}]}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ class NativeEventRelay {
|
|||
}
|
||||
|
||||
void _onFileExifUpdatedEvent(FileExifUpdatedEvent ev) {
|
||||
_log.info(ev);
|
||||
filesController.applySyncResult(fileExifs: ev.fileIds);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue