- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for TestSetDefault (0.14 sec)
-
src/log/slog/logger.go
// The defaultHandler will use whatever the log default writer is currently // set to, which is correct. // This can occur with SetDefault(Default()). // See TestSetDefault. if _, ok := l.Handler().(*defaultHandler); !ok { capturePC := log.Flags()&(log.Lshortfile|log.Llongfile) != 0 log.SetOutput(&handlerWriter{l.Handler(), &logLoggerLevel, capturePC})
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
r.Add(test.args...) got := attrsSlice(r) if !attrsEqual(got, test.want) { t.Errorf("%v:\ngot %v\nwant %v", test.args, got, test.want) } } } func TestSetDefault(t *testing.T) { // Verify that setting the default to itself does not result in deadlock. ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 10 21:25:30 UTC 2023 - 19.5K bytes - Viewed (0)