Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 19 of 19 for LevelInfo (0.18 sec)

  1. src/log/slog/record_test.go

    	r2.AddAttrs(Int("p", 2))
    	check(r1, r1Attrs) // r1 is unchanged
    	check(r2, append(slices.Clip(r1Attrs), Int("p", 2)))
    }
    
    func newRecordWithAttrs(as []Attr) Record {
    	r := NewRecord(time.Now(), LevelInfo, "", 0)
    	r.AddAttrs(as...)
    	return r
    }
    
    func attrsSlice(r Record) []Attr {
    	s := make([]Attr, 0, r.NumAttrs())
    	r.Attrs(func(a Attr) bool { s = append(s, a); return true })
    	return s
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 15:10:55 UTC 2023
    - 4K bytes
    - Viewed (0)
  2. src/compress/flate/huffman_code.go

    	lfs       byFreq    // stored to avoid repeated allocation in generate
    }
    
    type literalNode struct {
    	literal uint16
    	freq    int32
    }
    
    // A levelInfo describes the state of the constructed tree for a given depth.
    type levelInfo struct {
    	// Our level.  for better printing
    	level int32
    
    	// The frequency of the last node at this level
    	lastFreq int32
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 9.7K bytes
    - Viewed (0)
  3. src/log/slog/internal/benchmarks/handlers_test.go

    package benchmarks
    
    import (
    	"bytes"
    	"context"
    	"log/slog"
    	"slices"
    	"testing"
    )
    
    func TestHandlers(t *testing.T) {
    	ctx := context.Background()
    	r := slog.NewRecord(testTime, slog.LevelInfo, testMessage, 0)
    	r.AddAttrs(testAttrs...)
    	t.Run("text", func(t *testing.T) {
    		var b bytes.Buffer
    		h := newFastTextHandler(&b)
    		if err := h.Handle(ctx, r); err != nil {
    			t.Fatal(err)
    		}
    		got := b.String()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  4. src/log/slog/example_log_level_test.go

    	defer log.SetFlags(log.Flags()) // revert changes after the example
    	log.SetFlags(0)
    	defer log.SetOutput(log.Writer()) // revert changes after the example
    	log.SetOutput(os.Stdout)
    
    	// Default logging level is slog.LevelInfo.
    	log.Print("log debug") // log debug
    	slog.Debug("debug")    // no output
    	slog.Info("info")      // INFO info
    
    	// Set the default logging level to slog.LevelDebug.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 10 21:25:30 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  5. src/log/slog/handler_test.go

    			sub2 := h.WithAttrs([]Attr{Bool("sub2", true)})
    			var wg sync.WaitGroup
    			for i := 0; i < count; i++ {
    				sub1Record := NewRecord(time.Time{}, LevelInfo, "hello from sub1", 0)
    				sub1Record.AddAttrs(Int("i", i))
    				sub2Record := NewRecord(time.Time{}, LevelInfo, "hello from sub2", 0)
    				sub2Record.AddAttrs(Int("i", i))
    				wg.Add(1)
    				go func() {
    					defer wg.Done()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 02 13:57:53 UTC 2023
    - 19.6K bytes
    - Viewed (0)
  6. src/log/slog/doc.go

    suppressing debug logging until it is needed.
    The built-in handlers can be configured with the minimum level to output by
    setting [HandlerOptions.Level].
    The program's `main` function typically does this.
    The default value is LevelInfo.
    
    Setting the [HandlerOptions.Level] field to a [Level] value
    fixes the handler's minimum level throughout its lifetime.
    Setting it to a [LevelVar] allows the level to be varied dynamically.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 15 14:35:48 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  7. src/log/slog/handler.go

    	AddSource bool
    
    	// Level reports the minimum record level that will be logged.
    	// The handler discards records with lower levels.
    	// If Level is nil, the handler assumes LevelInfo.
    	// The handler calls Level.Level for each record processed;
    	// to adjust the minimum level dynamically, use a LevelVar.
    	Level Leveler
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 18:18:13 UTC 2023
    - 17.5K bytes
    - Viewed (0)
  8. api/go1.21.txt

    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
    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
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 09:39:17 UTC 2023
    - 25.6K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"KindLogValuer", Const, 21},
    		{"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},
    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