go-admin: github.com/GoAdminGroup/go-admin/modules/logger Index | Files

package logger

import "github.com/GoAdminGroup/go-admin/modules/logger"

Index

Package Files

logger.go

func Access Uses

func Access(ctx *context.Context)

Access print the access message.

func Debug Uses

func Debug(info ...interface{})

Debug print the debug message.

func Debugf Uses

func Debugf(template string, args ...interface{})

Debugf print the debug message.

func Error Uses

func Error(err ...interface{})

Error print the error message.

func Errorf Uses

func Errorf(template string, args ...interface{})

Errorf print the error message.

func Fatal Uses

func Fatal(info ...interface{})

Fatal print the fatal message.

func Fatalf Uses

func Fatalf(template string, args ...interface{})

Fatalf print the fatal message.

func Info Uses

func Info(info ...interface{})

Info print the info message.

func Infof Uses

func Infof(template string, args ...interface{})

Info print the info message.

func InitWithConfig Uses

func InitWithConfig(cfg Config)

func LogSQL Uses

func LogSQL(statement string, args []interface{})

LogSQL print the sql info message.

func OpenSQLLog Uses

func OpenSQLLog()

OpenSQLLog set the sqlLogOpen true.

func SetRotate Uses

func SetRotate(cfg RotateCfg)

func Warn Uses

func Warn(info ...interface{})

Warn print the warning message.

func Warnf Uses

func Warnf(template string, args ...interface{})

Warnf print the warning message.

type Config Uses

type Config struct {
    InfoLogOff   bool
    ErrorLogOff  bool
    AccessLogOff bool

    SqlLogOpen bool

    InfoLogPath   string
    ErrorLogPath  string
    AccessLogPath string

    AccessAssetsLogOff bool

    Rotate RotateCfg
    Encode EncoderCfg

    Level int8

    Debug bool
}

type EncoderCfg Uses

type EncoderCfg struct {
    TimeKey       string
    LevelKey      string
    NameKey       string
    CallerKey     string
    MessageKey    string
    StacktraceKey string
    Level         string
    Time          string
    Duration      string
    Caller        string
    Encoding      string
}

type Logger Uses

type Logger struct {
    Level zapcore.Level
    // contains filtered or unexported fields
}

func (*Logger) Init Uses

func (l *Logger) Init()

func (*Logger) SetEncoder Uses

func (l *Logger) SetEncoder(cfg EncoderCfg)

func (*Logger) SetRotate Uses

func (l *Logger) SetRotate(cfg RotateCfg)

type RotateCfg Uses

type RotateCfg struct {
    MaxSize    int
    MaxBackups int
    MaxAge     int
    Compress   bool
}

Package logger imports 9 packages (graph) and is imported by 47 packages. Updated 2020-08-01. Refresh now. Tools for package owners.