logger icon indicating copy to clipboard operation
logger copied to clipboard

Make message argument generic

Open 0ttik opened this issue 3 years ago • 0 comments

E.g.

final logger = Logger<MyMessage>();
logger.i(MyMessage("I'm potato", tag: Tag.potato));

class MyMessage {
  final dynamic message;
  final Tag? tag;
  ...
}

enum Tag {potato, nonPotato}

I think this also compliments this https://github.com/leisim/logger/issues/68#issuecomment-786637080 because solution there doesn't provide type-safety.

0ttik avatar Aug 12 '21 14:08 0ttik