Method
Send
(level codersdk.LogLevel, log string)
Source from the content-addressed store, hash-verified
| 76 | } |
| 77 | |
| 78 | func (c *agentClientV2) Send(level codersdk.LogLevel, log string) error { |
| 79 | err := c.sl.Send(c.ctx, agentsdk.Log{ |
| 80 | CreatedAt: time.Now(), |
| 81 | Output: log, |
| 82 | Level: level, |
| 83 | }) |
| 84 | if err != nil { |
| 85 | return xerrors.Errorf("send build log: %w", err) |
| 86 | } |
| 87 | err = c.flush() |
| 88 | if err != nil { |
| 89 | return xerrors.Errorf("flush: %w", err) |
| 90 | } |
| 91 | return nil |
| 92 | } |
| 93 | |
| 94 | func (c *agentClientV2) flush() error { |
| 95 | c.ls.Flush(c.source) |
Callers
nothing calls this directly
Tested by
no test coverage detected