Skip to content

Repository files navigation

slslog

Overview

AWS Lambda の標準出力に吐かれたログを Cloudwatch Logs Insight で trace 付きで一連の処理を追うことのできるための Logger です。

This is inspired by https://github.com/DeNA/aelog.

Usage

constlabel="$LogLabelName"funcmain() {
slslog.SetLogLabel(label)
span:=slslog.StartSpan(context.Background(), label)
deferspan.End()
ctx:=span.Context()
Infof(ctx, "this is slslog output")
// Output:// {"severity":"INFO","message":"this is slslog output","trace":"service/$LogLabelName/trace/...","span":"service/$LogLabelName/span/..."}
}

See Also

About

CW Logs Insight で trace で一連の処理を追うことのできる Logger です。

Resources

Stars

5 stars

Watchers

10 watching

Forks

Releases

Packages

Contributors

Languages