added log table

This commit is contained in:
2021-10-11 14:53:32 -03:00
parent d06e5bceae
commit 8fb8bb502e
2 changed files with 19 additions and 1 deletions
+6
View File
@@ -3,6 +3,7 @@ package replay
import (
"fmt"
"os"
"time"
"go.digitalcircle.com.br/open/replaycli-go/api"
"go.digitalcircle.com.br/open/replaycli-go/types"
@@ -13,6 +14,11 @@ type Cli struct {
*api.ApiCli
}
func (c *Cli) Log(l *types.Log) error {
l.Alias = c.ReplayEnvAlias()
l.Dtlog = time.Now()
return c.HttpCli().JsonPost("/api/v1/log", l, nil)
}
func (c *Cli) ReplayEnvQueueId() string {
return os.Getenv("REPLAY_QUEUEID")
}