Skip to content

Commit

Permalink
replace: on LogRepository
Browse files Browse the repository at this point in the history
wip drop: `RepositoryV2`

wip #377
  • Loading branch information
zin- committed Aug 31, 2024
1 parent a1648a6 commit e23ef4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 9 additions & 1 deletion lib/logger/log.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import 'package:mem/framework/repository/entity.dart';
// 言葉の意味としては「丸太を投げ込め!」という号令で、「航海開始」を表す
//
// 航海日誌においては、最初の記録ということになる
class Log extends EntityV2 {
class Log with Entity {
final Level level;
final List<String> prefixes;
final dynamic target;
Expand Down Expand Up @@ -102,6 +102,14 @@ class Log extends EntityV2 {

return elements.join('\n');
}

@override

Check warning on line 106 in lib/logger/log.dart

View check run for this annotation

Codecov / codecov/patch

lib/logger/log.dart#L106

Added line #L106 was not covered by tests
// TODO: implement copiedWith
Entity copiedWith() => throw UnimplementedError();

Check warning on line 108 in lib/logger/log.dart

View check run for this annotation

Codecov / codecov/patch

lib/logger/log.dart#L108

Added line #L108 was not covered by tests

@override

Check warning on line 110 in lib/logger/log.dart

View check run for this annotation

Codecov / codecov/patch

lib/logger/log.dart#L110

Added line #L110 was not covered by tests
// TODO: implement toMap
Map<String, dynamic> get toMap => throw UnimplementedError();

Check warning on line 112 in lib/logger/log.dart

View check run for this annotation

Codecov / codecov/patch

lib/logger/log.dart#L112

Added line #L112 was not covered by tests
}

enum Level {
Expand Down
3 changes: 1 addition & 2 deletions lib/logger/log_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ import 'package:mem/framework/repository/repository.dart';
import 'log.dart';
import 'logger_wrapper.dart';

class LogRepository extends RepositoryV2<Log> with Receiver<Log, void> {
class LogRepository extends Repository<Log> {
LoggerWrapper _loggerWrapper;

@override
Future<void> receive(Log entity) async => _loggerWrapper.log(
entity.level,
entity.buildMessage(),
Expand Down

0 comments on commit e23ef4b

Please sign in to comment.