mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
comment updates for glog
This commit is contained in:
@ -6,18 +6,25 @@
|
||||
|
||||
package glog
|
||||
|
||||
// Print prints <v> with newline using fmt.Sprintln.
|
||||
// The param <v> can be multiple variables.
|
||||
func Print(v ...interface{}) {
|
||||
logger.Print(v ...)
|
||||
}
|
||||
|
||||
// Printf prints <v> with format <format> using fmt.Sprintf.
|
||||
// The param <v> can be multiple variables.
|
||||
func Printf(format string, v ...interface{}) {
|
||||
logger.Printf(format, v ...)
|
||||
}
|
||||
|
||||
// See Print.
|
||||
func Println(v ...interface{}) {
|
||||
logger.Println(v ...)
|
||||
}
|
||||
|
||||
// Printf prints <v> with newline and format <format> using fmt.Sprintf.
|
||||
// The param <v> can be multiple variables.
|
||||
func Printfln(format string, v ...interface{}) {
|
||||
logger.Printfln(format, v ...)
|
||||
}
|
||||
@ -37,86 +44,119 @@ func Fatalfln(format string, v ...interface{}) {
|
||||
logger.Fatalfln(format, v ...)
|
||||
}
|
||||
|
||||
// Panic prints the logging content with [PANI] header and newline, then panics.
|
||||
func Panic(v ...interface{}) {
|
||||
logger.Panic(v ...)
|
||||
}
|
||||
|
||||
// Panicf prints the logging content with [PANI] header and custom format, then panics.
|
||||
func Panicf(format string, v ...interface{}) {
|
||||
logger.Panicf(format, v ...)
|
||||
}
|
||||
|
||||
// Panicfln prints the logging content with [PANI] header, newline and custom format, then panics.
|
||||
func Panicfln(format string, v ...interface{}) {
|
||||
logger.Panicfln(format, v ...)
|
||||
}
|
||||
|
||||
// Info prints the logging content with [INFO] header and newline.
|
||||
func Info(v ...interface{}) {
|
||||
logger.Info(v...)
|
||||
}
|
||||
|
||||
// Infof prints the logging content with [INFO] header and custom format.
|
||||
func Infof(format string, v ...interface{}) {
|
||||
logger.Infof(format, v...)
|
||||
}
|
||||
|
||||
// Infofln prints the logging content with [INFO] header, newline and custom format.
|
||||
func Infofln(format string, v ...interface{}) {
|
||||
logger.Infofln(format, v...)
|
||||
}
|
||||
|
||||
// Debug prints the logging content with [DEBU] header and newline.
|
||||
func Debug(v ...interface{}) {
|
||||
logger.Debug(v...)
|
||||
}
|
||||
|
||||
// Debugf prints the logging content with [DEBU] header and custom format.
|
||||
func Debugf(format string, v ...interface{}) {
|
||||
logger.Debugf(format, v...)
|
||||
}
|
||||
|
||||
// Debugfln prints the logging content with [DEBU] header, newline and custom format.
|
||||
func Debugfln(format string, v ...interface{}) {
|
||||
logger.Debugfln(format, v...)
|
||||
}
|
||||
|
||||
// Notice prints the logging content with [NOTI] header and newline.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Notice(v ...interface{}) {
|
||||
logger.Notice(v...)
|
||||
}
|
||||
|
||||
// Noticef prints the logging content with [NOTI] header and custom format.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Noticef(format string, v ...interface{}) {
|
||||
logger.Noticef(format, v...)
|
||||
}
|
||||
|
||||
// Noticefln prints the logging content with [NOTI] header, newline and custom format.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Noticefln(format string, v ...interface{}) {
|
||||
logger.Noticefln(format, v...)
|
||||
}
|
||||
|
||||
// Warning prints the logging content with [WARN] header and newline.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Warning(v ...interface{}) {
|
||||
logger.Warning(v...)
|
||||
}
|
||||
|
||||
// Warningf prints the logging content with [WARN] header and custom format.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Warningf(format string, v ...interface{}) {
|
||||
logger.Warningf(format, v...)
|
||||
}
|
||||
|
||||
// Warningfln prints the logging content with [WARN] header, newline and custom format.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Warningfln(format string, v ...interface{}) {
|
||||
logger.Warningfln(format, v...)
|
||||
}
|
||||
|
||||
// Error prints the logging content with [ERRO] header and newline.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Error(v ...interface{}) {
|
||||
logger.Error(v...)
|
||||
}
|
||||
|
||||
// Errorf prints the logging content with [ERRO] header and custom format.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Errorf(format string, v ...interface{}) {
|
||||
logger.Errorf(format, v...)
|
||||
}
|
||||
|
||||
// Errorfln prints the logging content with [ERRO] header, newline and custom format.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Errorfln(format string, v ...interface{}) {
|
||||
logger.Errorfln(format, v...)
|
||||
}
|
||||
|
||||
// Critical prints the logging content with [CRIT] header and newline.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Critical(v ...interface{}) {
|
||||
logger.Critical(v...)
|
||||
}
|
||||
|
||||
func Infof(format string, v ...interface{}) {
|
||||
logger.Infof(format, v...)
|
||||
}
|
||||
|
||||
func Debugf(format string, v ...interface{}) {
|
||||
logger.Debugf(format, v...)
|
||||
}
|
||||
|
||||
func Noticef(format string, v ...interface{}) {
|
||||
logger.Noticef(format, v...)
|
||||
}
|
||||
|
||||
func Warningf(format string, v ...interface{}) {
|
||||
logger.Warningf(format, v...)
|
||||
}
|
||||
|
||||
func Errorf(format string, v ...interface{}) {
|
||||
logger.Errorf(format, v...)
|
||||
}
|
||||
|
||||
// Criticalf prints the logging content with [CRIT] header and custom format.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Criticalf(format string, v ...interface{}) {
|
||||
logger.Criticalf(format, v...)
|
||||
}
|
||||
|
||||
func Infofln(format string, v ...interface{}) {
|
||||
logger.Infofln(format, v...)
|
||||
}
|
||||
|
||||
func Debugfln(format string, v ...interface{}) {
|
||||
logger.Debugfln(format, v...)
|
||||
}
|
||||
|
||||
func Noticefln(format string, v ...interface{}) {
|
||||
logger.Noticefln(format, v...)
|
||||
}
|
||||
|
||||
func Warningfln(format string, v ...interface{}) {
|
||||
logger.Warningfln(format, v...)
|
||||
}
|
||||
|
||||
func Errorfln(format string, v ...interface{}) {
|
||||
logger.Errorfln(format, v...)
|
||||
}
|
||||
|
||||
// Criticalfln prints the logging content with [CRIT] header, newline and custom format.
|
||||
// It also prints caller backtrace info if backtrace feature is enabled.
|
||||
func Criticalfln(format string, v ...interface{}) {
|
||||
logger.Criticalfln(format, v...)
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ func (l *Logger) Println(v ...interface{}) {
|
||||
l.Print(v...)
|
||||
}
|
||||
|
||||
// Printf prints <v> with newline and format <format> using fmt.Sprintf.
|
||||
// Printfln prints <v> with newline and format <format> using fmt.Sprintf.
|
||||
// The param <v> can be multiple variables.
|
||||
func (l *Logger) Printfln(format string, v ...interface{}) {
|
||||
l.printStd(fmt.Sprintf(format + ln, v...))
|
||||
|
||||
Reference in New Issue
Block a user