Documentation ¶
Index ¶
- Constants
- func Blue(format string, args ...any)
- func Cyan(format string, args ...any)
- func Green(format string, args ...any)
- func Purple(format string, args ...any)
- func Red(format string, args ...any)
- func White(format string, args ...any)
- func Yellow(format string, args ...any)
- type Level
- type Log
- func (l *Log) Debug(msg string, args ...interface{})
- func (l *Log) Error(msg string, args ...interface{})
- func (l *Log) GetLevel() hclog.Level
- func (l *Log) ImpliedArgs() []interface{}
- func (l *Log) Info(msg string, args ...interface{})
- func (l *Log) IsDebug() bool
- func (l *Log) IsError() bool
- func (l *Log) IsInfo() bool
- func (l *Log) IsTrace() bool
- func (l *Log) IsWarn() bool
- func (l *Log) Log(level hclog.Level, msg string, args ...interface{})
- func (l *Log) Name() string
- func (l *Log) Named(name string) hclog.Logger
- func (l *Log) ResetNamed(name string) hclog.Logger
- func (l *Log) SetLevel(level hclog.Level)
- func (l *Log) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
- func (l *Log) StandardWriter(opts *hclog.StandardLoggerOptions) io.Writer
- func (l *Log) Trace(msg string, args ...interface{})
- func (l *Log) Warn(msg string, args ...interface{})
- func (l *Log) With(args ...interface{}) hclog.Logger
- type Option
Constants ¶
View Source
const ( HeaderLevel = "X-NetLog-Level" HeaderName = "X-NetLog-Name" HeaderContentType = "Content-Type" HeaderUserAgent = "User-Agent" )
View Source
const ( DefaultUseTLS = false DefaultAddress = "127.0.0.1" DefaultPort = 9999 DefaultName = "default" DefaultTimeout = 1 * time.Second EnvAddress = "NETLOG_ADDRESS" EnvPort = "NETLOG_PORT" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
func (*Log) ImpliedArgs ¶
func (l *Log) ImpliedArgs() []interface{}
func (*Log) ResetNamed ¶
func (*Log) StandardLogger ¶
func (*Log) StandardWriter ¶
type Option ¶
type Option func(*Log)
func WithAddress ¶
func WithPurple ¶ added in v0.3.2
func WithPurple() Option
func WithTimeout ¶
func WithYellow ¶ added in v0.3.2
func WithYellow() Option
Click to show internal directories.
Click to hide internal directories.