fleet/server/logging/stdout.go
billcobbler 20328b0f87
Add stdout and kinesis logger plugins and sts assume role to Firehose (#2282)
Co-authored-by: Brendan Shaklovitz <nyanshak@users.noreply.github.com>
2020-08-19 14:56:44 -07:00

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
}