mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
20328b0f87
Co-authored-by: Brendan Shaklovitz <nyanshak@users.noreply.github.com>
22 lines
342 B
Go
22 lines
342 B
Go
package logging
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
"fmt"
|
|
)
|
|
|
|
type stdoutLogWriter struct {
|
|
}
|
|
|
|
func NewStdoutLogWriter() (*stdoutLogWriter, error) {
|
|
return &stdoutLogWriter{}, nil
|
|
}
|
|
|
|
func (l *stdoutLogWriter) Write(ctx context.Context, logs []json.RawMessage) error {
|
|
for _, log := range logs {
|
|
fmt.Printf("%s\n", log)
|
|
}
|
|
return nil
|
|
}
|