- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 67 for syslog (0.12 sec)
-
src/log/slog/internal/benchmarks/handlers.go
case slog.KindUint64: *buf = strconv.AppendUint(*buf, v.Uint64(), 10) case slog.KindFloat64: *buf = strconv.AppendFloat(*buf, v.Float64(), 'g', -1, 64) case slog.KindBool: *buf = strconv.AppendBool(*buf, v.Bool()) case slog.KindDuration: *buf = strconv.AppendInt(*buf, v.Duration().Nanoseconds(), 10) case slog.KindTime: h.appendTime(buf, v.Time()) case slog.KindAny: a := v.Any()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 12 20:33:37 UTC 2023 - 4.1K bytes - Viewed (0) -
src/log/slog/example_test.go
package slog_test import ( "log/slog" "net/http" "os" "time" ) func ExampleGroup() { r, _ := http.NewRequest("GET", "localhost", nil) // ... logger := slog.New( slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{ ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr { if a.Key == slog.TimeKey && len(groups) == 0 { return slog.Attr{} } return a }, }), )
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 14:56:30 UTC 2023 - 857 bytes - Viewed (0) -
src/log/slog/example_wrap_test.go
r := slog.NewRecord(time.Now(), slog.LevelInfo, fmt.Sprintf(format, args...), pcs[0]) _ = logger.Handler().Handle(context.Background(), r) } func Example_wrapping() { replace := func(groups []string, a slog.Attr) slog.Attr { // Remove time. if a.Key == slog.TimeKey && len(groups) == 0 { return slog.Attr{} } // Remove the directory from the source's filename. if a.Key == slog.SourceKey {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 04 18:32:54 UTC 2023 - 1.3K bytes - Viewed (0) -
src/log/slog/example_log_level_test.go
currentLogLevel := slog.SetLogLoggerLevel(slog.LevelError) defer slog.SetLogLoggerLevel(currentLogLevel) // revert changes after the example defer slog.SetDefault(slog.Default()) // revert changes after the example slog.SetDefault(slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{ReplaceAttr: slogtest.RemoveTime}))) log.Print("error") // level=ERROR msg=error // Output: // level=ERROR msg=error
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 10 21:25:30 UTC 2023 - 1.9K bytes - Viewed (0) -
src/runtime/race/README
To update the .syso files use golang.org/x/build/cmd/racebuild. internal/amd64v1/race_darwin.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5. internal/amd64v1/race_freebsd.syso built with LLVM 51bfeff0e4b0757ff773da6882f4d538996c9b04 and Go e7d582b55dda36e76ce4d0ce770139ca0915b7c5.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:19:32 UTC 2023 - 1.7K bytes - Viewed (0) -
src/log/slog/example_level_handler_test.go
// license that can be found in the LICENSE file. package slog_test import ( "context" "log/slog" "log/slog/internal/slogtest" "os" ) // A LevelHandler wraps a Handler with an Enabled method // that returns false for levels below a minimum. type LevelHandler struct { level slog.Leveler handler slog.Handler } // NewLevelHandler returns a LevelHandler with the given level.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 04 18:32:54 UTC 2023 - 2.2K bytes - Viewed (0) -
src/log/slog/internal/benchmarks/handlers_test.go
t.Fatal(err) } got := h.ringBuffer[0] if !got.Time.Equal(r.Time) || !slices.EqualFunc(attrSlice(got), attrSlice(r), slog.Attr.Equal) { t.Errorf("got %+v, want %+v", got, r) } }) } func attrSlice(r slog.Record) []slog.Attr { var as []slog.Attr r.Attrs(func(a slog.Attr) bool { as = append(as, a); return true }) return as
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 23:34:11 UTC 2023 - 1.1K bytes - Viewed (0) -
src/log/slog/internal/benchmarks/benchmarks.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Mar 25 12:14:46 UTC 2023 - 1.9K bytes - Viewed (0) -
src/log/slog/internal/slogtest/slogtest.go
// Package slogtest contains support functions for testing slog. package slogtest import "log/slog" // RemoveTime removes the top-level time attribute. // It is intended to be used as a ReplaceAttr function, // to make example output deterministic. func RemoveTime(groups []string, a slog.Attr) slog.Attr { if a.Key == slog.TimeKey && len(groups) == 0 { return slog.Attr{} } return a
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 12 20:33:11 UTC 2023 - 553 bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/stack_windows.go
}() } wg.Wait() mem2, err := getPagefileUsage() if err != nil { panic(err) } // assumes that this process creates 1 thread for each // thread locked goroutine plus extra 10 threads // like sysmon and others print((mem2 - mem1) / (threadCount + 10))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 23 17:31:31 UTC 2023 - 1.1K bytes - Viewed (0)