-
Notifications
You must be signed in to change notification settings - Fork 2
/
aelog_test.go
47 lines (35 loc) · 1.66 KB
/
aelog_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package aelog
import (
"context"
"go.opencensus.io/trace"
)
func ExampleDebugf() {
ctx := trace.NewContext(context.Background(), nil)
Debugf(ctx, "Debugf: %s", "Sample Text")
// Output:
// {"severity":"DEBUG","message":"Debugf: Sample Text","logging.googleapis.com/trace":"projects//traces/00000000000000000000000000000000","logging.googleapis.com/spanId":"0000000000000000"}
}
func ExampleInfof() {
ctx := trace.NewContext(context.Background(), nil)
Infof(ctx, "Infof: %s", "Sample Text")
// Output:
// {"severity":"INFO","message":"Infof: Sample Text","logging.googleapis.com/trace":"projects//traces/00000000000000000000000000000000","logging.googleapis.com/spanId":"0000000000000000"}
}
func ExampleWarningf() {
ctx := trace.NewContext(context.Background(), nil)
Warningf(ctx, "Warningf: %s", "Sample Text")
// Output:
// {"severity":"WARNING","message":"Warningf: Sample Text","logging.googleapis.com/trace":"projects//traces/00000000000000000000000000000000","logging.googleapis.com/spanId":"0000000000000000"}
}
func ExampleErrorf() {
ctx := trace.NewContext(context.Background(), nil)
Errorf(ctx, "Errorf: %s", "Sample Text")
// Output:
// {"severity":"ERROR","message":"Errorf: Sample Text","logging.googleapis.com/trace":"projects//traces/00000000000000000000000000000000","logging.googleapis.com/spanId":"0000000000000000"}
}
func ExampleCriticalf() {
ctx := trace.NewContext(context.Background(), nil)
Criticalf(ctx, "Criticalf: %s", "Sample Text")
// Output:
// {"severity":"CRITICAL","message":"Criticalf: Sample Text","logging.googleapis.com/trace":"projects//traces/00000000000000000000000000000000","logging.googleapis.com/spanId":"0000000000000000"}
}