Documentation
¶
Index ¶
- Constants
- func Default() *logger
- func Error(args ...any)
- func ErrorContext(ctx context.Context, args ...any)
- func Errorf(template string, args ...any)
- func ErrorfContext(ctx context.Context, template string, args ...any)
- func Fatal(args ...any)
- func FatalContext(ctx context.Context, args ...any)
- func GetLogStr(needLog string) string
- func GetMessage(template string, fmtArgs []any) string
- func Info(args ...any)
- func InfoContext(ctx context.Context, args ...any)
- func Infof(template string, args ...any)
- func InfofContext(ctx context.Context, template string, args ...any)
- func InitLog(fileDir string, serviceName string, port string, console bool, json bool, ...)
- func NewLogInstance(fileDir string, serviceName string, port string, console bool, json bool, ...) *slog.Logger
- func Panic(args ...any)
- func PanicContext(ctx context.Context, args ...any)
- func Sync()
- func Warn(args ...any)
- func WarnContext(ctx context.Context, args ...any)
- func Warnf(template string, args ...any)
- func WarnfContext(ctx context.Context, template string, args ...any)
Constants ¶
View Source
const (
DEFAULT_FILE = "log.log"
)
Variables ¶
This section is empty.
Functions ¶
func ErrorContext ¶ added in v0.12.12
func ErrorfContext ¶ added in v0.12.12
func FatalContext ¶ added in v0.12.12
func GetMessage ¶ added in v0.7.0
getMessage format with Sprint, Sprintf, or neither.
func InfoContext ¶ added in v0.12.12
func InfofContext ¶ added in v0.12.12
func NewLogInstance ¶ added in v0.6.10
func PanicContext ¶ added in v0.12.12
func WarnContext ¶ added in v0.12.12
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.