Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Setup(ops ...Option)
- func Sync() error
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func Write(p []byte) (int, error)
- type Formatter
- type LogConfig
- type LogWriter
- type NLog
- func (n *NLog) Debug(args ...interface{})
- func (n *NLog) Debugf(format string, args ...interface{})
- func (n *NLog) Error(args ...interface{})
- func (n *NLog) Errorf(format string, args ...interface{})
- func (n *NLog) Fatal(args ...interface{})
- func (n *NLog) Fatalf(format string, args ...interface{})
- func (n *NLog) Info(args ...interface{})
- func (n *NLog) Infof(format string, args ...interface{})
- func (n *NLog) Warn(args ...interface{})
- func (n *NLog) Warnf(format string, args ...interface{})
- func (n *NLog) WithCtx(ctx context.Context) *NLog
- func (n *NLog) Write(p []byte) (int, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Formatter ¶
func NewDefaultFormatter ¶
func NewDefaultFormatter() Formatter
func NewGinLogFormatter ¶
func NewGinLogFormatter() Formatter
type LogConfig ¶
type LogConfig struct { LogLevel string LogPath string // MaxFileSizeMB is the maximum size in megabytes of the log file before it gets // rotated. It defaults to 100 megabytes. MaxFileSizeMB int // MaxFiles is the maximum number of old log files to retain. The default // is to retain all old log files MaxFiles int Compress bool }
type LogWriter ¶
type LogWriter interface { Infof(format string, args ...interface{}) Info(args ...interface{}) Debugf(format string, args ...interface{}) Debug(args ...interface{}) Warnf(format string, args ...interface{}) Warn(args ...interface{}) Errorf(format string, args ...interface{}) Error(args ...interface{}) Fatalf(format string, args ...interface{}) Fatal(args ...interface{}) Sync() error Write(p []byte) (int, error) }
func GetDefaultLogWriter ¶
func GetDefaultLogWriter() LogWriter
type NLog ¶
type NLog struct {
// contains filtered or unexported fields
}
func DefaultLogger ¶
func DefaultLogger() *NLog
Source Files ¶
Click to show internal directories.
Click to hide internal directories.