diff --git a/api/replay/cli.go b/api/replay/cli.go index 9eed13f..91a0054 100644 --- a/api/replay/cli.go +++ b/api/replay/cli.go @@ -16,11 +16,15 @@ type Cli struct { *api.ApiCli } +//Log saves log to database after populated func (c *Cli) Log(l *types.Log) error { l.Alias = c.ReplayEnvAlias() l.Dtlogend = time.Now() return c.HttpCli().JsonPost("/api/v1/log/add", l, nil) } + +//NewLog creates a new log instance in the client, capable of collecting data in memory for later saving it to the +//database by calling Log func (c *Cli) NewLog() *types.Log { ret := &types.Log{} ret.Alias = c.ReplayEnvAlias()