Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use printlnDepth function in *lnDepth log function calls. #292

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions klog.go
Expand Up @@ -1615,7 +1615,7 @@ func Warningln(args ...interface{}) {
// WarninglnDepth acts as Warningln but uses depth to determine which call frame to log.
// WarninglnDepth(0, "msg") is the same as Warningln("msg").
func WarninglnDepth(depth int, args ...interface{}) {
logging.printDepth(warningLog, logging.logr, logging.filter, depth, args...)
logging.printlnDepth(warningLog, logging.logr, logging.filter, depth, args...)
}

// Warningf logs to the WARNING and INFO logs.
Expand Down Expand Up @@ -1651,7 +1651,7 @@ func Errorln(args ...interface{}) {
// ErrorlnDepth acts as Errorln but uses depth to determine which call frame to log.
// ErrorlnDepth(0, "msg") is the same as Errorln("msg").
func ErrorlnDepth(depth int, args ...interface{}) {
logging.printDepth(errorLog, logging.logr, logging.filter, depth, args...)
logging.printlnDepth(errorLog, logging.logr, logging.filter, depth, args...)
}

// Errorf logs to the ERROR, WARNING, and INFO logs.
Expand Down Expand Up @@ -1708,7 +1708,7 @@ func Fatalln(args ...interface{}) {
// FatallnDepth acts as Fatalln but uses depth to determine which call frame to log.
// FatallnDepth(0, "msg") is the same as Fatalln("msg").
func FatallnDepth(depth int, args ...interface{}) {
logging.printDepth(fatalLog, logging.logr, logging.filter, depth, args...)
logging.printlnDepth(fatalLog, logging.logr, logging.filter, depth, args...)
}

// Fatalf logs to the FATAL, ERROR, WARNING, and INFO logs,
Expand Down Expand Up @@ -1752,7 +1752,7 @@ func Exitln(args ...interface{}) {
// ExitlnDepth(0, "msg") is the same as Exitln("msg").
func ExitlnDepth(depth int, args ...interface{}) {
atomic.StoreUint32(&fatalNoStacks, 1)
logging.printDepth(fatalLog, logging.logr, logging.filter, depth, args...)
logging.printlnDepth(fatalLog, logging.logr, logging.filter, depth, args...)
}

// Exitf logs to the FATAL, ERROR, WARNING, and INFO logs, then calls os.Exit(1).
Expand Down