logger

package
v0.0.0-...-ba70d0f Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Overview

Package logger provides the logger for the service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(message ...any)

Debug logs a debug message.

func Debugf

func Debugf(template string, message ...any)

Debugf logs a debug message.

func Error

func Error(message ...any)

Error logs an error message.

func Errorf

func Errorf(template string, message ...any)

Errorf logs an error message with a format.

func Fatal

func Fatal(message ...any)

Fatal logs a fatal message.

func Fatalf

func Fatalf(template string, message ...any)

Fatalf logs a fatal message.

func Info

func Info(message ...any)

Info logs an info message.

func Infof

func Infof(template string, message ...any)

Infof logs an info message with a format.

func SetLogLevel

func SetLogLevel(ll string)

SetLogLevel set logger default level

func Warn

func Warn(message ...any)

Warn logs an warn message.

func Warnf

func Warnf(template string, message ...any)

Warnf logs an error message with a format.

Types

type Logger

type Logger interface {
	Info(args ...any)
	Infof(template string, args ...any)
	Infoln(args ...any)

	Debug(args ...any)
	Debugf(template string, args ...any)
	Debugln(args ...any)

	Warning(args ...any)
	Warningf(template string, args ...any)
	Warningln(args ...any)

	Error(args ...any)
	Errorf(template string, args ...any)
	Errorln(args ...any)

	Fatal(args ...any)
	Fatalf(template string, args ...any)
	Fatalln(args ...any)

	V(l int) bool
	Sync() error
}

Logger define default logger for logger

func NewLogger

func NewLogger() Logger

NewLogger creates a new logger instance.

type SystemLog

type SystemLog interface{ Logger }

SystemLog define system logger, include grpclog wrapped

func NewSystemLog

func NewSystemLog() SystemLog

NewSystemLog init all system log, like logger global variable, grpclog global variable

Directories

Path Synopsis
Package internal provides the logger for the package.
Package internal provides the logger for the package.

Jump to

Keyboard shortcuts

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