added log history

This commit is contained in:
2021-10-11 18:38:44 -03:00
parent 392c7940af
commit d12b549846
2 changed files with 27 additions and 8 deletions
+8 -1
View File
@@ -17,9 +17,16 @@ type Cli struct {
func (c *Cli) Log(l *types.Log) error {
l.Alias = c.ReplayEnvAlias()
l.Dtlog = time.Now()
l.Dtlogend = time.Now()
return c.HttpCli().JsonPost("/api/v1/log/add", l, nil)
}
func (c *Cli) NewLog() *types.Log {
ret := &types.Log{}
ret.Alias = c.ReplayEnvAlias()
ret.Dtlog = time.Now()
return ret
}
func (c *Cli) ReplayEnvQueueId() string {
return os.Getenv("REPLAY_QUEUEID")
}