Skip to content

Commit

Permalink
modify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl committed Jul 20, 2017
1 parent 2bab5b1 commit 53149fe
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 3 additions & 6 deletions grpclog/grpclog.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,23 @@ func Errorln(args ...interface{}) {
// It calls os.Exit() with exit code 1.
func Fatal(args ...interface{}) {
logger.Fatal(args...)
// logger.Fatal should call os.Exit().
// Still call os.Exit() here in case the implementation doesn't.
// Make sure fatal logs will exit.
os.Exit(1)
}

// Fatalf logs to the FATAL log. Arguments are handled in the manner of fmt.Printf.
// It calles os.Exit() with exit code 1.
func Fatalf(format string, args ...interface{}) {
logger.Fatalf(format, args...)
// logger.Fatal should call os.Exit().
// Still call os.Exit() here in case the implementation doesn't.
// Make sure fatal logs will exit.
os.Exit(1)
}

// Fatalln logs to the FATAL log. Arguments are handled in the manner of fmt.Println.
// It calle os.Exit()) with exit code 1.
func Fatalln(args ...interface{}) {
logger.Fatalln(args...)
// logger.Fatal should call os.Exit().
// Still call os.Exit() here in case the implementation doesn't.
// Make sure fatal logs will exit.
os.Exit(1)
}

Expand Down
9 changes: 6 additions & 3 deletions grpclog/loggerv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,16 @@ type LoggerV2 interface {
// Errorf logs to ERROR log. Arguments are handled in the manner of fmt.Printf.
Errorf(format string, args ...interface{})
// Fatal logs to ERROR log. Arguments are handled in the manner of fmt.Print.
// This function should call os.Exit() with a non-zero exit code.
// gRPC ensures that all Fatal logs will exit with os.Exit(1).
// Implementations may also call os.Exit() with a non-zero exit code.
Fatal(args ...interface{})
// Fatalln logs to ERROR log. Arguments are handled in the manner of fmt.Println.
// This function should call os.Exit() with a non-zero exit code.
// gRPC ensures that all Fatal logs will exit with os.Exit(1).
// Implementations may also call os.Exit() with a non-zero exit code.
Fatalln(args ...interface{})
// Fatalf logs to ERROR log. Arguments are handled in the manner of fmt.Printf.
// This function should call os.Exit() with a non-zero exit code.
// gRPC ensures that all Fatal logs will exit with os.Exit(1).
// Implementations may also call os.Exit() with a non-zero exit code.
Fatalf(format string, args ...interface{})
// V reports whether verbosity level l is at least the requested verbose level.
V(l int) bool
Expand Down

0 comments on commit 53149fe

Please sign in to comment.