package main

import (
	"encoding/json"
	"fmt"

	"git.apinb.com/bsm-sdk/core/infra"
	"git.apinb.com/bsm-sdk/core/utils"
)

func main() {
	endpoint := "http://127.0.0.1:16289/oplogs/v1/log"

	data := make([]*infra.LogItem, 0)
	data = append(data, &infra.LogItem{OpID: 1, OpName: "test", OpType: "test", Text: "test", Module: "测试模块", Code: "0197640D70D373A2927E03946CC4DC48", Ip: "127.0.0.1", Level: 1})
	fmt.Println(data)
	// oplog.New(endpoint, data)
	jsonBytes, _ := json.Marshal(data)
	utils.HttpPost(endpoint, nil, jsonBytes)

}
