Debian Codegraph @

stdlib/go1_22_log_slog.go

raw symbols SCIP
1 // Code generated by 'yaegi extract log/slog'. DO NOT EDIT.
2
3 //go:build go1.22
4 // +build go1.22
5
6 package stdlib
7
8 import (
9 "context"
10 "go/constant"
11 "go/token"
12 "log/slog"
13 "reflect"
14 )
15
16 func init() {
17 Symbols["log/slog/slog"] = map[string]reflect.Value{
18 // function, constant and variable definitions
19 "Any": reflect.ValueOf(slog.Any),
20 "AnyValue": reflect.ValueOf(slog.AnyValue),
21 "Bool": reflect.ValueOf(slog.Bool),
22 "BoolValue": reflect.ValueOf(slog.BoolValue),
23 "Debug": reflect.ValueOf(slog.Debug),
24 "DebugContext": reflect.ValueOf(slog.DebugContext),
25 "Default": reflect.ValueOf(slog.Default),
26 "Duration": reflect.ValueOf(slog.Duration),
27 "DurationValue": reflect.ValueOf(slog.DurationValue),
28 "Error": reflect.ValueOf(slog.Error),
29 "ErrorContext": reflect.ValueOf(slog.ErrorContext),
30 "Float64": reflect.ValueOf(slog.Float64),
31 "Float64Value": reflect.ValueOf(slog.Float64Value),
32 "Group": reflect.ValueOf(slog.Group),
33 "GroupValue": reflect.ValueOf(slog.GroupValue),
34 "Info": reflect.ValueOf(slog.Info),
35 "InfoContext": reflect.ValueOf(slog.InfoContext),
36 "Int": reflect.ValueOf(slog.Int),
37 "Int64": reflect.ValueOf(slog.Int64),
38 "Int64Value": reflect.ValueOf(slog.Int64Value),
39 "IntValue": reflect.ValueOf(slog.IntValue),
40 "KindAny": reflect.ValueOf(slog.KindAny),
41 "KindBool": reflect.ValueOf(slog.KindBool),
42 "KindDuration": reflect.ValueOf(slog.KindDuration),
43 "KindFloat64": reflect.ValueOf(slog.KindFloat64),
44 "KindGroup": reflect.ValueOf(slog.KindGroup),
45 "KindInt64": reflect.ValueOf(slog.KindInt64),
46 "KindLogValuer": reflect.ValueOf(slog.KindLogValuer),
47 "KindString": reflect.ValueOf(slog.KindString),
48 "KindTime": reflect.ValueOf(slog.KindTime),
49 "KindUint64": reflect.ValueOf(slog.KindUint64),
50 "LevelDebug": reflect.ValueOf(slog.LevelDebug),
51 "LevelError": reflect.ValueOf(slog.LevelError),
52 "LevelInfo": reflect.ValueOf(slog.LevelInfo),
53 "LevelKey": reflect.ValueOf(constant.MakeFromLiteral("\"level\"", token.STRING, 0)),
54 "LevelWarn": reflect.ValueOf(slog.LevelWarn),
55 "Log": reflect.ValueOf(slog.Log),
56 "LogAttrs": reflect.ValueOf(slog.LogAttrs),
57 "MessageKey": reflect.ValueOf(constant.MakeFromLiteral("\"msg\"", token.STRING, 0)),
58 "New": reflect.ValueOf(slog.New),
59 "NewJSONHandler": reflect.ValueOf(slog.NewJSONHandler),
60 "NewLogLogger": reflect.ValueOf(slog.NewLogLogger),
61 "NewRecord": reflect.ValueOf(slog.NewRecord),
62 "NewTextHandler": reflect.ValueOf(slog.NewTextHandler),
63 "SetDefault": reflect.ValueOf(slog.SetDefault),
64 "SetLogLoggerLevel": reflect.ValueOf(slog.SetLogLoggerLevel),
65 "SourceKey": reflect.ValueOf(constant.MakeFromLiteral("\"source\"", token.STRING, 0)),
66 "String": reflect.ValueOf(slog.String),
67 "StringValue": reflect.ValueOf(slog.StringValue),
68 "Time": reflect.ValueOf(slog.Time),
69 "TimeKey": reflect.ValueOf(constant.MakeFromLiteral("\"time\"", token.STRING, 0)),
70 "TimeValue": reflect.ValueOf(slog.TimeValue),
71 "Uint64": reflect.ValueOf(slog.Uint64),
72 "Uint64Value": reflect.ValueOf(slog.Uint64Value),
73 "Warn": reflect.ValueOf(slog.Warn),
74 "WarnContext": reflect.ValueOf(slog.WarnContext),
75 "With": reflect.ValueOf(slog.With),
76
77 // type definitions
78 "Attr": reflect.ValueOf((*slog.Attr)(nil)),
79 "Handler": reflect.ValueOf((*slog.Handler)(nil)),
80 "HandlerOptions": reflect.ValueOf((*slog.HandlerOptions)(nil)),
81 "JSONHandler": reflect.ValueOf((*slog.JSONHandler)(nil)),
82 "Kind": reflect.ValueOf((*slog.Kind)(nil)),
83 "Level": reflect.ValueOf((*slog.Level)(nil)),
84 "LevelVar": reflect.ValueOf((*slog.LevelVar)(nil)),
85 "Leveler": reflect.ValueOf((*slog.Leveler)(nil)),
86 "LogValuer": reflect.ValueOf((*slog.LogValuer)(nil)),
87 "Logger": reflect.ValueOf((*slog.Logger)(nil)),
88 "Record": reflect.ValueOf((*slog.Record)(nil)),
89 "Source": reflect.ValueOf((*slog.Source)(nil)),
90 "TextHandler": reflect.ValueOf((*slog.TextHandler)(nil)),
91 "Value": reflect.ValueOf((*slog.Value)(nil)),
92
93 // interface wrapper definitions
94 "_Handler": reflect.ValueOf((*_log_slog_Handler)(nil)),
95 "_Leveler": reflect.ValueOf((*_log_slog_Leveler)(nil)),
96 "_LogValuer": reflect.ValueOf((*_log_slog_LogValuer)(nil)),
97 }
98 }
99
100 // _log_slog_Handler is an interface wrapper for Handler type
101 type _log_slog_Handler struct {
102 IValue interface{}
103 WEnabled func(a0 context.Context, a1 slog.Level) bool
104 WHandle func(a0 context.Context, a1 slog.Record) error
105 WWithAttrs func(attrs []slog.Attr) slog.Handler
106 WWithGroup func(name string) slog.Handler
107 }
108
109 func (W _log_slog_Handler) Enabled(a0 context.Context, a1 slog.Level) bool { return W.WEnabled(a0, a1) }
110 func (W _log_slog_Handler) Handle(a0 context.Context, a1 slog.Record) error { return W.WHandle(a0, a1) }
111 func (W _log_slog_Handler) WithAttrs(attrs []slog.Attr) slog.Handler { return W.WWithAttrs(attrs) }
112 func (W _log_slog_Handler) WithGroup(name string) slog.Handler { return W.WWithGroup(name) }
113
114 // _log_slog_Leveler is an interface wrapper for Leveler type
115 type _log_slog_Leveler struct {
116 IValue interface{}
117 WLevel func() slog.Level
118 }
119
120 func (W _log_slog_Leveler) Level() slog.Level { return W.WLevel() }
121
122 // _log_slog_LogValuer is an interface wrapper for LogValuer type
123 type _log_slog_LogValuer struct {
124 IValue interface{}
125 WLogValue func() slog.Value
126 }
127
128 func (W _log_slog_LogValuer) LogValue() slog.Value { return W.WLogValue() }