Skip to content

Commit

Permalink
Publish talker_bloc_logger v2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Frezyx committed Dec 1, 2023
1 parent f5b6316 commit c79a68c
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ Follow these steps to use this package
### Add dependency
```yaml
dependencies:
talker_bloc_logger: ^2.3.0
talker_bloc_logger: ^2.3.1
```
### Usage
Expand Down
5 changes: 4 additions & 1 deletion packages/talker_bloc_logger/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
## 2.3.1
- Update README.md

## 2.3.0
- Add onCreate, onClose logs
- Add **printClosings** **printCreations** settings fields (false by default)

Thanks to [wcoder](https://github.com/wcoder)
Thanks to [cem256](https://github.com/cem256)

## 2.2.2
- Update **talker** version to 3.1.5
Expand Down
27 changes: 26 additions & 1 deletion packages/talker_bloc_logger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Follow these steps to use this package
### Add dependency
```yaml
dependencies:
talker_bloc_logger: ^2.3.0
talker_bloc_logger: ^2.3.1
```
### Usage
Expand All @@ -49,6 +49,31 @@ final talker = Talker();
Bloc.observer = TalkerBlocObserver(talker: talker);
```

## Settings

This package has a lot of customization options
You can enable/disable somethings events, Bloc creation, changes, closing logs, etc...

```dart
Bloc.observer = TalkerBlocObserver(
settings: TalkerBlocLoggerSettings(
enabled: true,
printEventFullData: false,
printStateFullData: false,
printChanges: true,
printClosings: true,
printCreations: true,
printEvents: true,
printTransitions: true,
// If you want log only AuthBloc transitions
transitionFilter: (bloc, transition) =>
bloc.runtimeType.toString() == 'AuthBloc',
// If you want log only AuthBloc events
eventFilter: (bloc, event) => bloc.runtimeType.toString() == 'AuthBloc',
),
);
```

## Additional information
The project is under development and ready for your pull-requests and issues 👍<br>
Thank you for support ❤️
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@ import 'package:talker_bloc_logger/talker_bloc_logger.dart';
void main() async {
Bloc.observer = TalkerBlocObserver(
settings: TalkerBlocLoggerSettings(
enabled: true,
printEventFullData: false,
printStateFullData: false,
printChanges: true,
printClosings: true,
printCreations: true,
printEvents: true,
printTransitions: true,
// If you want log only AuthBloc transitions
transitionFilter: (bloc, transition) =>
bloc.runtimeType.toString() == 'AuthBloc',
// If you want log only AuthBloc events
eventFilter: (bloc, event) => bloc.runtimeType.toString() == 'AuthBloc',
),
);
final somethingBloc = SomethingBloc();
Expand Down
2 changes: 1 addition & 1 deletion packages/talker_bloc_logger/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: talker_bloc_logger
description: Lightweight and customizable BLoC state management library logger on talker base.
version: 2.3.0
version: 2.3.1
homepage: https://github.com/Frezyx/talker
repository: https://github.com/Frezyx/talker
issue_tracker: https://github.com/Frezyx/talker/issues
Expand Down

0 comments on commit c79a68c

Please sign in to comment.