2023-05-27 01:06:18 +07:00
|
|
|
# vLogs SDK for Dart
|
|
|
|
|
|
|
|
A simple way to collect logs and send to the server via simple SDK.
|
|
|
|
|
|
|
|
- [x] Collect the logs
|
|
|
|
- [ ] Support local retries
|
|
|
|
|
|
|
|
## Usages
|
|
|
|
|
|
|
|
```dart
|
|
|
|
import 'package:vlogs/vlogs.dart';
|
|
|
|
|
|
|
|
void main() async {
|
|
|
|
final APP_ID = "xxx";
|
|
|
|
final API_KEY = "vlogs_xxx";
|
|
|
|
|
2023-05-27 09:50:12 +07:00
|
|
|
final sdk = VLogs.createWith(APP_ID, API_KEY);
|
2023-05-27 01:06:18 +07:00
|
|
|
|
2023-05-27 09:04:53 +07:00
|
|
|
var request = Collector.builder()
|
2023-05-27 01:06:18 +07:00
|
|
|
.message("Hello World")
|
|
|
|
.source(CollectorSource.mobile.name)
|
|
|
|
.type(CollectorType.log.name)
|
|
|
|
.build();
|
|
|
|
|
|
|
|
var response = await sdk.collect(request);
|
|
|
|
print("Response: ${response.toJson()}");
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Contributors
|
|
|
|
|
|
|
|
- Sambo Chea <sombochea@cubetiqs.com>
|