Skip to content

Commit

Permalink
resolve comments warning
Browse files Browse the repository at this point in the history
Signed-off-by: lowang_bh <lhui_wang@163.com>
  • Loading branch information
lowang-bh committed May 27, 2023
1 parent 5ac9b76 commit 6c35c6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions klog.go
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ func (l *loggingT) printWithFileLine(s severity.Severity, logger *logWriter, fil
l.output(s, logger, buf, 2 /* depth */, file, line, alsoToStderr)
}

// if loggr is specified, will call loggr.Error, otherwise output with logging module.
// if logger is specified, will call logger.Error, otherwise output with logging module.
func (l *loggingT) errorS(err error, logger *logWriter, filter LogFilter, depth int, msg string, keysAndValues ...interface{}) {
if filter != nil {
msg, keysAndValues = filter.FilterS(msg, keysAndValues)
Expand All @@ -771,7 +771,7 @@ func (l *loggingT) errorS(err error, logger *logWriter, filter LogFilter, depth
l.printS(err, severity.ErrorLog, depth+1, msg, keysAndValues...)
}

// if loggr is specified, will call loggr.Info, otherwise output with logging module.
// if logger is specified, will call logger.Info, otherwise output with logging module.
func (l *loggingT) infoS(logger *logWriter, filter LogFilter, depth int, msg string, keysAndValues ...interface{}) {
if filter != nil {
msg, keysAndValues = filter.FilterS(msg, keysAndValues)
Expand All @@ -783,7 +783,7 @@ func (l *loggingT) infoS(logger *logWriter, filter LogFilter, depth int, msg str
l.printS(nil, severity.InfoLog, depth+1, msg, keysAndValues...)
}

// printS is called from infoS and errorS if loggr is not specified.
// printS is called from infoS and errorS if logger is not specified.
// set log severity by s
func (l *loggingT) printS(err error, s severity.Severity, depth int, msg string, keysAndValues ...interface{}) {
// Only create a new buffer if we don't have one cached.
Expand Down

0 comments on commit 6c35c6a

Please sign in to comment.