From 6edd02e614b0cf923ed40b23b6ad79b7c9c7b36c Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Tue, 5 Jul 2022 22:09:21 +0900 Subject: [PATCH] testdata: output: Use Error level log Signed-off-by: Hiroshi Hatake --- testdata/output/output.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testdata/output/output.go b/testdata/output/output.go index cf1751d..00a0cf2 100644 --- a/testdata/output/output.go +++ b/testdata/output/output.go @@ -28,6 +28,7 @@ func (plug *outputPlugin) Init(ctx context.Context, fbit *plugin.Fluentbit) erro func (plug outputPlugin) Flush(ctx context.Context, ch <-chan plugin.Message) error { f, err := os.Create("/fluent-bit/etc/output.txt") if err != nil { + plug.log.Error("[go-test-output-plugin] operation failed. reason %w", err) return fmt.Errorf("could not open output.txt: %w", err) } @@ -39,6 +40,7 @@ func (plug outputPlugin) Flush(ctx context.Context, ch <-chan plugin.Message) er _, err := fmt.Fprintf(f, "message=\"got record\" tag=%s time=%s record=%+v\n", msg.Tag(), msg.Time.Format(time.RFC3339), msg.Record) if err != nil { + plug.log.Error("[go-test-output-plugin] operation failed. reason %w", err) return fmt.Errorf("could not write to output.txt: %w", err) } }