Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for LevelKey (0.24 sec)

  1. src/log/slog/handler_test.go

    			wantJSON: "{}",
    		},
    		{
    			name:     "remove built-in",
    			replace:  removeKeys(TimeKey, LevelKey, MessageKey),
    			attrs:    attrs,
    			wantText: "a=one b=2",
    			wantJSON: `{"a":"one","b":2}`,
    		},
    		{
    			name:     "preformatted remove built-in",
    			replace:  removeKeys(TimeKey, LevelKey, MessageKey),
    			with:     func(h Handler) Handler { return h.WithAttrs(preAttrs) },
    			attrs:    attrs,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 02 13:57:53 UTC 2023
    - 19.6K bytes
    - Viewed (0)
  2. src/testing/slogtest/slogtest.go

    }
    
    var cases = []testCase{
    	{
    		name:        "built-ins",
    		explanation: withSource("this test expects slog.TimeKey, slog.LevelKey and slog.MessageKey"),
    		f: func(l *slog.Logger) {
    			l.Info("message")
    		},
    		checks: []check{
    			hasKey(slog.TimeKey),
    			hasKey(slog.LevelKey),
    			hasAttr(slog.MessageKey, "message"),
    		},
    	},
    	{
    		name:        "attrs",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 17:55:47 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  3. src/log/slog/example_custom_levels_test.go

    			if a.Key == slog.TimeKey {
    				return slog.Attr{}
    			}
    
    			// Customize the name of the level key and the output string, including
    			// custom level values.
    			if a.Key == slog.LevelKey {
    				// Rename the level key from "level" to "sev".
    				a.Key = "sev"
    
    				// Handle custom level values.
    				level := a.Value.Any().(slog.Level)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jul 11 17:06:26 UTC 2023
    - 3K bytes
    - Viewed (0)
  4. src/log/slog/handler.go

    	// TimeKey is the key used by the built-in handlers for the time
    	// when the log method is called. The associated Value is a [time.Time].
    	TimeKey = "time"
    	// LevelKey is the key used by the built-in handlers for the level
    	// of the log call. The associated value is a [Level].
    	LevelKey = "level"
    	// MessageKey is the key used by the built-in handlers for the
    	// message of the log call. The associated value is a string.
    	MessageKey = "msg"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 18:18:13 UTC 2023
    - 17.5K bytes
    - Viewed (0)
  5. pkg/log/config.go

    	WarnLevel:  zapcore.WarnLevel,
    	ErrorLevel: zapcore.ErrorLevel,
    	FatalLevel: zapcore.FatalLevel,
    	NoneLevel:  none,
    }
    
    var defaultEncoderConfig = zapcore.EncoderConfig{
    	TimeKey:        "time",
    	LevelKey:       "level",
    	NameKey:        "scope",
    	CallerKey:      "caller",
    	MessageKey:     "msg",
    	StacktraceKey:  "stack",
    	LineEnding:     zapcore.DefaultLineEnding,
    	EncodeLevel:    zapcore.LowercaseLevelEncoder,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Mar 26 20:38:10 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  6. src/crypto/x509/name_constraints_test.go

    			for level, intermediates := range test.intermediates {
    				levelKey := privateKeys.Get().(*ecdsa.PrivateKey)
    				keys = append(keys, levelKey)
    				levelName := "Intermediate level " + strconv.Itoa(level)
    				var last *Certificate
    
    				for _, intermediate := range intermediates {
    					caCert, err := makeConstraintsCACert(intermediate, levelName, levelKey, parent, parentKey)
    					if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 09 22:40:21 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  7. api/go1.21.txt

    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
    pkg log/slog, const LevelKey ideal-string #56345
    pkg log/slog, const LevelKey = "level" #56345
    pkg log/slog, const LevelWarn = 4 #56345
    pkg log/slog, const LevelWarn Level #56345
    pkg log/slog, const MessageKey ideal-string #56345
    pkg log/slog, const MessageKey = "msg" #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)
  8. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"KindString", Const, 21},
    		{"KindTime", Const, 21},
    		{"KindUint64", Const, 21},
    		{"Level", Type, 21},
    		{"LevelDebug", Const, 21},
    		{"LevelError", Const, 21},
    		{"LevelInfo", Const, 21},
    		{"LevelKey", Const, 21},
    		{"LevelVar", Type, 21},
    		{"LevelWarn", Const, 21},
    		{"Leveler", Type, 21},
    		{"Log", Func, 21},
    		{"LogAttrs", Func, 21},
    		{"LogValuer", Type, 21},
    		{"Logger", Type, 21},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top