xlog

package
v0.0.0-...-e6fb8a6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright 2020 The VectorSQL Authors.

Code is licensed under Apache License, Version 2.0.

Index

Constants

View Source
const (
	D_LOG_FLAGS int = log.LstdFlags | log.Lmicroseconds
)

Variables

View Source
var LevelNames = [...]string{
	DEBUG:   "DEBUG",
	INFO:    "INFO",
	WARNING: "WARNING",
	ERROR:   "ERROR",
	FATAL:   "FATAL",
	PANIC:   "PANIC",
}

Functions

This section is empty.

Types

type Log

type Log struct {
	*log.Logger
	// contains filtered or unexported fields
}

func GetLog

func GetLog() *Log

func NewLog

func NewLog(w io.Writer, prefix string, flag int) *Log

func NewStdLog

func NewStdLog(opts ...Option) *Log

func NewXLog

func NewXLog(w io.Writer, opts ...Option) *Log

func (*Log) Close

func (t *Log) Close()

func (*Log) Debug

func (t *Log) Debug(format string, v ...interface{})

func (*Log) Error

func (t *Log) Error(format string, v ...interface{})

func (*Log) Fatal

func (t *Log) Fatal(format string, v ...interface{})

func (*Log) Info

func (t *Log) Info(format string, v ...interface{})

func (*Log) Panic

func (t *Log) Panic(format string, v ...interface{})

func (*Log) SetLevel

func (t *Log) SetLevel(level string)

func (*Log) Warning

func (t *Log) Warning(format string, v ...interface{})

type LogLevel

type LogLevel int
const (
	DEBUG LogLevel = 1 << iota
	INFO
	WARNING
	ERROR
	FATAL
	PANIC
)

type Option

type Option func(*Options)

func Level

func Level(v LogLevel) Option

func Name

func Name(v string) Option

type Options

type Options struct {
	Name  string
	Level LogLevel
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL