- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for LevelDebug (0.12 sec)
-
src/log/slog/logger.go
l.logAttrs(ctx, level, msg, attrs...) } // Debug logs at [LevelDebug]. func (l *Logger) Debug(msg string, args ...any) { l.log(context.Background(), LevelDebug, msg, args...) } // DebugContext logs at [LevelDebug] with the given context. func (l *Logger) DebugContext(ctx context.Context, msg string, args ...any) { l.log(ctx, LevelDebug, msg, args...) } // Info logs at [LevelInfo].
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 08 18:26:18 UTC 2024 - 10.2K bytes - Viewed (0) -
src/log/slog/logger_test.go
var logBuf bytes.Buffer log.SetOutput(&logBuf) log.SetFlags(0) for _, test := range []struct { logLevel Level logFn func(string, ...any) want string }{ {LevelDebug, Debug, "DEBUG a"}, {LevelDebug, Info, "INFO a"}, {LevelInfo, Debug, ""}, {LevelInfo, Info, "INFO a"}, } { SetLogLoggerLevel(test.logLevel) test.logFn("a") checkLogOutput(t, logBuf.String(), test.want)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 10 21:25:30 UTC 2023 - 19.5K bytes - Viewed (0) -
src/log/slog/handler_test.go
for _, test := range []struct { leveler Leveler want bool }{ {nil, true}, {LevelWarn, false}, {&LevelVar{}, true}, // defaults to Info {levelVar(LevelWarn), false}, {LevelDebug, true}, {levelVar(LevelDebug), true}, } { h := &commonHandler{opts: HandlerOptions{Level: test.leveler}} got := h.enabled(LevelInfo) if got != test.want { t.Errorf("%v: got %t, want %t", test.leveler, got, test.want)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 02 13:57:53 UTC 2023 - 19.6K bytes - Viewed (0) -
api/go1.21.txt
pkg log/slog, const KindTime = 6 #56345 pkg log/slog, const KindTime Kind #56345 pkg log/slog, const KindUint64 = 7 #56345 pkg log/slog, const KindUint64 Kind #56345 pkg log/slog, const LevelDebug = -4 #56345 pkg log/slog, const LevelDebug Level #56345 pkg log/slog, const LevelError = 8 #56345 pkg log/slog, const LevelError Level #56345 pkg log/slog, const LevelInfo = 0 #56345 pkg log/slog, const LevelInfo Level #56345
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 09:39:17 UTC 2023 - 25.6K bytes - Viewed (0) -
src/log/slog/doc.go
h := slog.NewJSONHandler(os.Stderr, &slog.HandlerOptions{Level: programLevel}) slog.SetDefault(slog.New(h)) Now the program can change its logging level with a single statement: programLevel.Set(slog.LevelDebug) # Groups Attributes can be collected into groups. A group has a name that is used to qualify the names of its attributes. How this qualification is displayed depends on the handler.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 15 14:35:48 UTC 2024 - 12.3K bytes - Viewed (0)