Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 574 for slog (0.04 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/slog/slog.go

    		}
    	})
    	return nil, nil
    }
    
    func isAttr(t types.Type) bool {
    	return analysisutil.IsNamedType(t, "log/slog", "Attr")
    }
    
    // shortName returns a name for the function that is shorter than FullName.
    // Examples:
    //
    //	"slog.Info" (instead of "log/slog.Info")
    //	"slog.Logger.With" (instead of "(*log/slog.Logger).With")
    func shortName(fn *types.Func) string {
    	var r string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. src/log/slog/doc.go

    a global LevelVar:
    
    	var programLevel = new(slog.LevelVar) // Info by default
    
    Then use the LevelVar to construct a handler, and make it the default:
    
    	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
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 15 14:35:48 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  3. src/log/slog/logger.go

    package slog
    
    import (
    	"context"
    	"log"
    	loginternal "log/internal"
    	"log/slog/internal"
    	"runtime"
    	"sync/atomic"
    	"time"
    )
    
    var defaultLogger atomic.Pointer[Logger]
    
    var logLoggerLevel LevelVar
    
    // SetLogLoggerLevel controls the level for the bridge to the [log] package.
    //
    // Before [SetDefault] is called, slog top-level logging functions call the default [log.Logger].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 08 18:26:18 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  4. src/go/build/deps_test.go

    	FMT, log/internal
    	< log;
    
    	log, log/slog !< crypto/tls, database/sql, go/importer, testing;
    
    	FMT, log, net
    	< log/syslog;
    
    	RUNTIME
    	< log/slog/internal, log/slog/internal/buffer;
    
    	FMT,
    	encoding, encoding/json,
    	log, log/internal,
    	log/slog/internal, log/slog/internal/buffer,
    	slices
    	< log/slog
    	< log/slog/internal/slogtest, log/slog/internal/benchmarks;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  5. src/cmd/vet/main.go

    	"golang.org/x/tools/go/analysis/passes/printf"
    	"golang.org/x/tools/go/analysis/passes/shift"
    	"golang.org/x/tools/go/analysis/passes/sigchanyzer"
    	"golang.org/x/tools/go/analysis/passes/slog"
    	"golang.org/x/tools/go/analysis/passes/stdmethods"
    	"golang.org/x/tools/go/analysis/passes/stdversion"
    	"golang.org/x/tools/go/analysis/passes/stringintconv"
    	"golang.org/x/tools/go/analysis/passes/structtag"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  6. src/cmd/go/internal/test/flagdefs.go

    	"lostcancel":       true,
    	"methods":          true,
    	"nilfunc":          true,
    	"printf":           true,
    	"rangeloops":       true,
    	"shift":            true,
    	"sigchanyzer":      true,
    	"slog":             true,
    	"stdmethods":       true,
    	"stdversion":       true,
    	"stringintconv":    true,
    	"structtag":        true,
    	"testinggoroutine": true,
    	"tests":            true,
    	"timeformat":       true,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 01:02:40 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  7. src/log/slog/attr_test.go

    // Copyright 2022 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package slog
    
    import (
    	"internal/testenv"
    	"testing"
    	"time"
    )
    
    func TestAttrNoAlloc(t *testing.T) {
    	testenv.SkipIfOptimizationOff(t)
    	// Assign values just to make sure the compiler doesn't optimize away the statements.
    	var (
    		i int64
    		u uint64
    		f float64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 18:23:25 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  8. src/log/slog/attr.go

    }
    
    // Group returns an Attr for a Group [Value].
    // The first argument is the key; the remaining arguments
    // are converted to Attrs as in [Logger.Log].
    //
    // Use Group to collect several key-value pairs under a single
    // key on a log line, or as the result of LogValue
    // in order to log a single value as multiple Attrs.
    func Group(key string, args ...any) Attr {
    	return Attr{key, GroupValue(argsToAttrSlice(args)...)}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 18:23:25 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  9. api/go1.22.txt

    pkg go/version, func IsValid(string) bool #62039
    pkg go/version, func Lang(string) string #62039
    pkg html/template, const ErrJSTemplate //deprecated #61619
    pkg io, method (*SectionReader) Outer() (ReaderAt, int64, int64) #61870
    pkg log/slog, func SetLogLoggerLevel(Level) Level #62418
    pkg math/big, method (*Rat) FloatPrec() (int, bool) #50489
    pkg math/rand/v2, func ExpFloat64() float64 #61716
    pkg math/rand/v2, func Float32() float32 #61716
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 20:54:27 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  10. pkg/log/options.go

    	// savings, leap seconds, etc. The default is to remove log files
    	// older than 30 days.
    	RotationMaxAge int
    
    	// RotationMaxBackups is the maximum number of old log files to retain.  The default
    	// is to retain at most 1000 logs.
    	RotationMaxBackups int
    
    	// JSONEncoding controls whether the log is formatted as JSON.
    	JSONEncoding bool
    
    	// logGRPC indicates that Grpc logs should be captured.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 07 04:04:34 UTC 2024
    - 10.6K bytes
    - Viewed (0)
Back to top