48
loading...
This website collects cookies to deliver better user experience
{
"data": [
{
"uuid": "a774e285-78d4-54bb-9dba-dca684f11400",
"device.udid": "6e306bed-4d7b-46f3-acee-fe6339b3c6fb",
"device.name": "PLK-AL10",
"device.type": "PLK-AL10",
"version.version": "1.4.6",
"version.build": "2020110306",
"language": "en",
"os_version": "6.0",
"timezone": "CAT",
"text": "This is a test log.",
"method": "test",
"file": "SourceFile",
"line": 1,
"log_level": 0,
"tag": "SynchronizationJob",
"time": "2021-04-20T09:34:24.157Z",
"thread_id": "21960",
"thread_name": "AndroidJob-2",
…
},
…
],
"previous": "https://dashboard.bugfender.com/api/…",
"next": "https://dashboard.bugfender.com/api/…",
}
// syncOnePage synchronizes one page of logs, returns error if something failed
func (i *Integration) syncOnePage(ctx context.Context) error {
// get a page from Bugfender
logs, err := i.bugfenderClient.GetNextPage(ctx)
if err != nil {
return err
}
if ctx.Err() != nil {
return ctx.Err()
}
// put it in the destination
err = i.destination.WriteLogs(ctx, logs)
if err != nil {
return err
}
if i.verbose {
log.Printf("Wrote %d logs", len(logs))
}
return ctx.Err()
}
./bugfender-integration-elasticsearch
-app-id=1234
-client-id=your_client_id
-client-secret=your_client_secret
-state-file state.json
-es-index logs
-es-nodes http://127.0.0.1:9200
48