package log
import "github.com/ydb-platform/ydb-go-sdk/v3/log"
Index ¶
- Constants
- func Coordination(l Logger, d trace.Detailer, opts ...Option) (t trace.Coordination)
- func DatabaseSQL(l Logger, d trace.Detailer, opts ...Option) (t trace.DatabaseSQL)
- func Default(w io.Writer, opts ...simpleLoggerOption) *defaultLogger
- func Discovery(l Logger, d trace.Detailer, opts ...Option) (t trace.Discovery)
- func Driver(l Logger, d trace.Detailer, opts ...Option) (t trace.Driver)
- func NamesFromContext(ctx context.Context) []string
- func Query(l Logger, d trace.Detailer, opts ...Option) (t trace.Query)
- func Ratelimiter(l Logger, d trace.Detailer, opts ...Option) (t trace.Ratelimiter)
- func Retry(l Logger, d trace.Detailer, opts ...Option) (t trace.Retry)
- func Scheme(l Logger, d trace.Detailer, opts ...Option) (t trace.Scheme)
- func Scripting(l Logger, d trace.Detailer, opts ...Option) (t trace.Scripting)
- func Table(l Logger, d trace.Detailer, opts ...Option) (t trace.Table)
- func Topic(l Logger, d trace.Detailer, opts ...Option) (t trace.Topic)
- func WithColoring() simpleLoggerOption
- func WithLevel(ctx context.Context, lvl Level) context.Context
- func WithLogQuery() logQueryOption
- func WithMinLevel(level Level) simpleLoggerOption
- func WithNames(ctx context.Context, names ...string) context.Context
- type Field
- func Any(k string, v any) Field
- func Bool(k string, v bool) Field
- func Duration(k string, v time.Duration) Field
- func Error(v error) Field
- func Int(k string, v int) Field
- func Int64(k string, v int64) Field
- func NamedError(k string, v error) Field
- func String(k, v string) Field
- func Stringer(k string, v fmt.Stringer) Field
- func Strings(k string, v []string) Field
- type Level
- func FromString(l string) Level
- func LevelFromContext(ctx context.Context) Level
- func (l Level) BoldColor() string
- func (l Level) Color() string
- func (l Level) String() string
- type Logger
- type Mapper
- type Option
Constants ¶
const ( IntType = kv.IntType Int64Type = kv.Int64Type StringType = kv.StringType BoolType = kv.BoolType DurationType = kv.DurationType StringsType = kv.StringsType ErrorType = kv.ErrorType AnyType = kv.AnyType StringerType = kv.StringerType )
Functions ¶
func Coordination ¶
Coordination makes trace.Coordination with logging events from details
func DatabaseSQL ¶
DatabaseSQL makes trace.DatabaseSQL with logging events from details
func Default ¶
func Discovery ¶
Discovery makes trace.Discovery with logging events from details
func Driver ¶
Driver makes trace.Driver with logging events from details
func NamesFromContext ¶
func Query ¶
Query makes trace.Query with logging events from details
func Ratelimiter ¶
Ratelimiter returns trace.Ratelimiter with logging events from details
func Retry ¶
Retry returns trace.Retry with logging events from details
func Scheme ¶
Scheme returns trace.Scheme with logging events from details
func Scripting ¶
Scripting returns trace.Scripting with logging events from details
func Table ¶
Table makes trace.Table with logging events from details
func Topic ¶
Topic returns trace.Topic with logging events from details
func WithColoring ¶
func WithColoring() simpleLoggerOption
func WithLevel ¶
func WithLogQuery ¶
func WithLogQuery() logQueryOption
func WithMinLevel ¶
func WithMinLevel(level Level) simpleLoggerOption
func WithNames ¶
Types ¶
type Field ¶
func Any ¶
func Bool ¶
func Duration ¶
func Error ¶
func Int ¶
func Int64 ¶
func NamedError ¶
func String ¶
func Stringer ¶
func Strings ¶
type Level ¶
type Level int
func FromString ¶
func LevelFromContext ¶
func (Level) BoldColor ¶
func (Level) Color ¶
func (Level) String ¶
type Logger ¶
type Logger interface { // Log logs the message with specified options and fields. // Implementations must not in any way use slice of fields after Log returns. Log(ctx context.Context, msg string, fields ...Field) }
type Mapper ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Source Files ¶
context.go coordination.go discovery.go driver.go field.go level.go logger.go options.go query.go ratelimiter.go retry.go scheme.go scripting.go sql.go table.go topic.go
- Version
- v3.105.2
- Published
- Apr 3, 2025
- Platform
- windows/amd64
- Imports
- 15 packages
- Last checked
- 7 seconds ago –
Tools for package owners.