Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/talker_grpc_logger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: talker_grpc_logger

on:
push:
paths:
- "packages/talker_grpc_logger/**"
- ".github/workflows/talker_grpc_logger.yaml"
pull_request:
paths:
- "packages/talker_grpc_logger/**"
- ".github/workflows/talker_grpc_logger.yaml"
permissions:
contents: read

jobs:
test:
uses: ./.github/workflows/test.yaml
with:
package: talker_grpc_logger
sdk: dart
109 changes: 102 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ Web Demo</a> page</p>
✅ &nbsp;Built-in support for [http logs](#talker-http-logger) <br>
✅ &nbsp;Built-in support for [BLoC logs](#talker-bloc-logger) <br>
✅ &nbsp;Built-in support for [Riverpod logs](#talker-riverpod-logger) <br>
✅ &nbsp;Built-in support for Chopper [HTTP logs](#talker-chopper-logger) <br>
✅ &nbsp;Built-in support for [Chopper HTTP logs](#talker-chopper-logger) <br>
✅ &nbsp;Built-in support for [GRPC calls](#talker-grpc-logger) <br>
✅ &nbsp;[Check all features](#features-list)

## Packages
Expand All @@ -65,6 +66,7 @@ Talker is designed for any level of customization. <br>
| [talker_riverpod_logger](https://github.com/Frezyx/talker/tree/master/packages/talker_riverpod_logger) | [![Pub](https://img.shields.io/pub/v/talker_riverpod_logger.svg?style=flat-square)](https://pub.dev/packages/talker_riverpod_logger) | Best logger for [Riverpod](https://pub.dev/packages/riverpod) state management library
| [talker_chopper_logger](https://github.com/Frezyx/talker/tree/master/packages/talker_chopper_logger) | [![Pub](https://img.shields.io/pub/v/talker_chopper_logger.svg?style=flat-square)](https://pub.dev/packages/talker_chopper_logger) | Best logger for [Chopper](https://pub.dev/packages/chopper) http calls |
| [talker_http_logger](https://github.com/Frezyx/talker/tree/master/packages/talker_http_logger) | [![Pub](https://img.shields.io/pub/v/talker_http_logger.svg?style=flat-square)](https://pub.dev/packages/talker_http_logger) | Best logger for [http](https://pub.dev/packages/http) package |
| [talker_grpc_logger](https://github.com/Frezyx/talker/tree/master/packages/talker_grpc_logger) | [![Pub](https://img.shields.io/pub/v/talker_grpc_logger.svg?style=flat-square)](https://pub.dev/packages/talker_grpc_logger) | Best logger for [grpc](https://pub.dev/packages/grpc) package |

## Table of contents

Expand Down Expand Up @@ -93,31 +95,39 @@ Talker is designed for any level of customization. <br>
- [More Features And Examples](#more-features-and-examples)
- [Integrations](#integrations)
- [Talker Dio Logger](#talker-dio-logger)
- [Getting Started](#getting-started)
- [Customization](#customization-dio)
- [Off/On http request or reposnse logs](#offon-http-request-or-reposnse-logs-dio)
- [Change http logs colors](#change-http-log-colors-dio)
- [Filter http logs](#filter-http-logs-dio)
- [Using with Talker](#using-with-talker-dio)
- [Talker BLoC Logger](#talker-bloc-logger)
- [Getting Started](#getting-started-1)
- [Customization](#customization-2)
- [Off/on events, transitions, changes, creation, close](#offon-events-transitions-changes-creation-close)
- [Full/truncated state and event data](#fulltruncated-state-and-event-data)
- [Filter bloc logs](#filter-bloc-logs)
- [Using with Talker](#using-with-talker-1)
- [Talker Riverpod Logger](#talker-riverpod-logger)
- [Getting Started](#getting-started-2)
- [Customization](#customization-3)
- [Off/on events, add, update, dispose, fail](#offon-events-add-update-dispose-fail)
- [Full/truncated state data](#fulltruncated-state-data)
- [Filter riverpod logs](#filter-riverpod-logs)
- [Using with Talker](#using-with-talker-2)
- [Talker Chopper Logger](#talker-chopper-logger)
- [Getting Started](#getting-started-3)
- [Customization](#customization-chopper)
- [Enable or disable HTTP request or response logs](#change-http-log-colors-chopper)
- [Print HTTP request curl command](#print-http-request-curl-command-chopper)
- [Hide sensitive HTTP request headers](#hide-sensitive-http-request-headers-chopper)
- [Change HTTP logs colors](#change-http-log-colors-chopper)
- [Filter HTTP logs](#filter-http-logs-chopper)
- [Using with existing Talker instance](#using-with-existing-talker-instance-chopper)
- [Talker GRPC Logger](#talker-grpc-logger)
- [Getting Started](#getting-started-4)
- [Using with Talker](#using-with-talker-3)
- [Token obfuscation](#token-obfuscation)
- [Crashlytics integration](#crashlytics-integration)
- [Features list](#features-list)
- [Coverage](#coverage)
Expand All @@ -134,7 +144,7 @@ Follow these steps to the coolest experience in error handling
### Add dependency
```yaml
dependencies:
talker: ^5.0.0-dev.12
talker: ^5.0.0-dev.14
```

### Easy to use
Expand Down Expand Up @@ -347,7 +357,7 @@ Talker Flutter is an extension for the Dart Talker package that adds extra funct
### Add dependency
```yaml
dependencies:
talker_flutter: ^5.0.0-dev.12
talker_flutter: ^5.0.0-dev.14
```

### Setup
Expand Down Expand Up @@ -591,7 +601,7 @@ Follow these steps to use this package
### Add dependency
```yaml
dependencies:
talker_dio_logger: ^5.0.0-dev.12
talker_dio_logger: ^5.0.0-dev.14
```

### Usage
Expand Down Expand Up @@ -692,7 +702,7 @@ Follow these steps to use this package
### Add dependency
```yaml
dependencies:
talker_bloc_logger: ^5.0.0-dev.12
talker_bloc_logger: ^5.0.0-dev.14
```

### Usage
Expand Down Expand Up @@ -780,7 +790,7 @@ Follow these steps to use this package
### Add dependency
```yaml
dependencies:
talker_riverpod_logger: ^5.0.0-dev.12
talker_riverpod_logger: ^5.0.0-dev.14
```

### Usage
Expand Down Expand Up @@ -904,10 +914,13 @@ A lightweight, straightforward, and visually appealing logging solution for apps
This is how the logs of your http requests will look in the console
![](docs/assets/talker_chopper_logger/preview.png?raw=true)

### Getting Started
Follow these steps to use this package

### Add dependency
```yaml
dependencies:
talker_chopper_logger: ^5.0.0-dev.12
talker_chopper_logger: ^5.0.0-dev.14
```

### Usage
Expand Down Expand Up @@ -1060,6 +1073,88 @@ final client = ChopperClient(
);
```

## Talker GRPC Logger

### Getting started
Follow these steps to use this package

### Add dependency
```yaml
dependencies:
talker_grpc_logger: ^5.0.0-dev.14
```

### Usage

Create an interceptor and instrument your RPC client:

```dart
import 'package:grpc/grpc.dart';
import 'package:talker_grpc_logger/talker_grpc_logger.dart';

void main() {
late final channel = GrpcOrGrpcWebClientChannel.toSingleEndpoint(
host: 'localhost',
port: 50051,
);

// Generate your RPC client as usual, and use the interceptor to log the requests and responses.
late final rpcClient = YourRPCClient(channel, interceptors: [
TalkerGrpcLogger()
]);
}
```


### Using with Talker

Very similar to the section above, just pass a Talker instance to the interceptor:

```dart
import 'package:grpc/grpc.dart';
import 'package:talker_flutter/talker_flutter.dart';
import 'package:talker_grpc_logger/talker_grpc_logger.dart';

void main() {
// Not mandatory, but useful to see the grpc logs in the Talker screen
final talker = TalkerFlutter.init();

// Define port and host as you see fit
var host = 'localhost';
var port = 50051;

// transportSecure needs to be true when talking to a server through TLS.
// This can be disabled for local development.
// GrpcOrGrpcWebClientChannel is a channel type compatible with web and native. There
// are other channel types available for each platform.
late final channel = GrpcOrGrpcWebClientChannel.toSingleEndpoint(
host: host,
port: port,
transportSecure: host == 'localhost' ? false : true);


final List<ClientInterceptor> interceptors = [
TalkerGrpcLogger(talker: talker)
];

// Generate your RPC client as usual, and use the interceptor to log the requests and responses.
late final rpcClient = YourRPCClient(channel, interceptors: interceptors);
}
```


### Token obfuscation

`TalkerGrpcLogger` will obfuscate bearer tokens by default. It'll look at the
metadata of the request and obfuscate the `authorization` header. It'll look
like `Bearer [obfuscated]` in the logs. It is highly recommended to keep this
option enabled. If you want to disable it, you can pass `obfuscateToken:
false`:

```dart
TalkerGrpcLogger(talker: talker, obfuscateToken: true)
```

## Crashlytics integration

If you add CrashlyticsTalkerObserver to your application, you will receive notifications about all application errors in the Crashlytics dashboard. <br>
Expand Down
6 changes: 3 additions & 3 deletions examples/shop_app_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ dependencies:
flutter:
sdk: flutter

talker_flutter: ^5.0.0-dev.12
talker_dio_logger: ^5.0.0-dev.12
talker_bloc_logger: ^5.0.0-dev.12
talker_flutter: ^5.0.0-dev.14
talker_dio_logger: ^5.0.0-dev.14
talker_bloc_logger: ^5.0.0-dev.14

get_it: ^7.6.7
flutter_bloc: ^9.0.0
Expand Down
11 changes: 11 additions & 0 deletions packages/talker/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 5.0.0-dev.14
- - [talker_grpc_logger] Add dart-style documentation

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

# 5.0.0-dev.13
- [talker_grpc_logger] Initial release with general package version
- [talker] Add grpc keys into `TalkerKey` class

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

# 5.0.0-dev.12
- - chore(deps): update dependency gradle to v9
- chore(deps): update plugin com.android.application to v8.12.0
Expand Down
5 changes: 5 additions & 0 deletions packages/talker/lib/src/talker_key.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ abstract class TalkerKey {
static const riverpodDispose = 'riverpod-dispose';
static const riverpodFail = 'riverpod-fail';

/// grpc section
static const grpcRequest = 'grpc-request';
static const grpcResponse = 'grpc-response';
static const grpcError = 'grpc-error';

/// Flutter section
static const route = 'route';

Expand Down
4 changes: 2 additions & 2 deletions packages/talker/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: talker
description: Advanced error handler and logger package for flutter and dart. App monitoring, logs history, report sharing, custom logs, and etc.
version: 5.0.0-dev.12
version: 5.0.0-dev.14
homepage: https://github.com/Frezyx/talker
repository: https://github.com/Frezyx/talker
issue_tracker: https://github.com/Frezyx/talker/issues
Expand All @@ -16,7 +16,7 @@ environment:
sdk: ">=2.17.0 <4.0.0"

dependencies:
talker_logger: ^5.0.0-dev.12
talker_logger: ^5.0.0-dev.14

dev_dependencies:
lints: ^2.0.0
Expand Down
11 changes: 11 additions & 0 deletions packages/talker_bloc_logger/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 5.0.0-dev.14
- - [talker_grpc_logger] Add dart-style documentation

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

# 5.0.0-dev.13
- [talker_grpc_logger] Initial release with general package version
- [talker] Add grpc keys into `TalkerKey` class

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

# 5.0.0-dev.12
- - chore(deps): update dependency gradle to v9
- chore(deps): update plugin com.android.application to v8.12.0
Expand Down
2 changes: 1 addition & 1 deletion packages/talker_bloc_logger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Follow these steps to use this package
### Add dependency
```yaml
dependencies:
talker_bloc_logger: ^5.0.0-dev.12
talker_bloc_logger: ^5.0.0-dev.14
```

### Usage
Expand Down
4 changes: 2 additions & 2 deletions 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: 5.0.0-dev.12
version: 5.0.0-dev.14
homepage: https://github.com/Frezyx/talker
repository: https://github.com/Frezyx/talker
issue_tracker: https://github.com/Frezyx/talker/issues
Expand All @@ -16,7 +16,7 @@ environment:
sdk: '>=2.15.0 <4.0.0'

dependencies:
talker: ^5.0.0-dev.12
talker: ^5.0.0-dev.14
bloc: ^9.0.0
meta: ^1.8.0

Expand Down
11 changes: 11 additions & 0 deletions packages/talker_chopper_logger/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 5.0.0-dev.14
- - [talker_grpc_logger] Add dart-style documentation

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

# 5.0.0-dev.13
- [talker_grpc_logger] Initial release with general package version
- [talker] Add grpc keys into `TalkerKey` class

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

# 5.0.0-dev.12
- - chore(deps): update dependency gradle to v9
- chore(deps): update plugin com.android.application to v8.12.0
Expand Down
2 changes: 1 addition & 1 deletion packages/talker_chopper_logger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Follow these steps to use this package
### Add dependency
```yaml
dependencies:
talker_chopper_logger: ^5.0.0-dev.12
talker_chopper_logger: ^5.0.0-dev.14
```

### Usage
Expand Down
4 changes: 2 additions & 2 deletions packages/talker_chopper_logger/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ environment:
dependencies:
flutter:
sdk: flutter
talker_chopper_logger: ^5.0.0-dev.12
talker_flutter: ^5.0.0-dev.12
talker_chopper_logger: ^5.0.0-dev.14
talker_flutter: ^5.0.0-dev.14
chopper: ^8.2.0
json_annotation: ^4.9.0
equatable: ^2.0.7
Expand Down
4 changes: 2 additions & 2 deletions packages/talker_chopper_logger/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: talker_chopper_logger
description: A lightweight, flexible HTTP client logger for Chopper built on the Talker platform, offering advanced exception handling and logging for Dart and Flutter applications.
version: 5.0.0-dev.12
version: 5.0.0-dev.14
homepage: https://github.com/Frezyx/talker
repository: https://github.com/Frezyx/talker
issue_tracker: https://github.com/Frezyx/talker/issues
Expand All @@ -20,7 +20,7 @@ dependencies:
equatable: ^2.0.7
http: ^1.4.0
meta: ^1.15.0
talker: ^5.0.0-dev.12
talker: ^5.0.0-dev.14

dev_dependencies:
http_parser: ^4.1.2
Expand Down
11 changes: 11 additions & 0 deletions packages/talker_dio_logger/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 5.0.0-dev.14
- - [talker_grpc_logger] Add dart-style documentation

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

# 5.0.0-dev.13
- [talker_grpc_logger] Initial release with general package version
- [talker] Add grpc keys into `TalkerKey` class

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

# 5.0.0-dev.12
- - chore(deps): update dependency gradle to v9
- chore(deps): update plugin com.android.application to v8.12.0
Expand Down
Loading