summaryrefslogtreecommitdiff
path: root/src/pkg/log/log.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-02-14 13:23:51 +0100
committerOndřej Surý <ondrej@sury.org>2011-02-14 13:23:51 +0100
commit758ff64c69e34965f8af5b2d6ffd65e8d7ab2150 (patch)
tree6d6b34f8c678862fe9b56c945a7b63f68502c245 /src/pkg/log/log.go
parent3e45412327a2654a77944249962b3652e6142299 (diff)
downloadgolang-upstream/2011-02-01.1.tar.gz
Imported Upstream version 2011-02-01.1upstream/2011-02-01.1
Diffstat (limited to 'src/pkg/log/log.go')
-rw-r--r--src/pkg/log/log.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/pkg/log/log.go b/src/pkg/log/log.go
index d34af9e5e..658e3bd94 100644
--- a/src/pkg/log/log.go
+++ b/src/pkg/log/log.go
@@ -4,11 +4,11 @@
// Simple logging package. It defines a type, Logger, with methods
// for formatting output. It also has a predefined 'standard' Logger
-// accessible through helper functions Print[f|ln], Exit[f|ln], and
+// accessible through helper functions Print[f|ln], Fatal[f|ln], and
// Panic[f|ln], which are easier to use than creating a Logger manually.
// That logger writes to standard error and prints the date and time
// of each logged message.
-// The Exit functions call os.Exit(1) after writing the log message.
+// The Fatal functions call os.Exit(1) after writing the log message.
// The Panic functions call panic after writing the log message.
package log
@@ -164,20 +164,20 @@ func (l *Logger) Print(v ...interface{}) { l.Output(2, fmt.Sprint(v...)) }
// Arguments are handled in the manner of fmt.Println.
func (l *Logger) Println(v ...interface{}) { l.Output(2, fmt.Sprintln(v...)) }
-// Exit is equivalent to l.Print() followed by a call to os.Exit(1).
-func (l *Logger) Exit(v ...interface{}) {
+// Fatal is equivalent to l.Print() followed by a call to os.Exit(1).
+func (l *Logger) Fatal(v ...interface{}) {
l.Output(2, fmt.Sprint(v...))
os.Exit(1)
}
-// Exitf is equivalent to l.Printf() followed by a call to os.Exit(1).
-func (l *Logger) Exitf(format string, v ...interface{}) {
+// Fatalf is equivalent to l.Printf() followed by a call to os.Exit(1).
+func (l *Logger) Fatalf(format string, v ...interface{}) {
l.Output(2, fmt.Sprintf(format, v...))
os.Exit(1)
}
-// Exitln is equivalent to l.Println() followed by a call to os.Exit(1).
-func (l *Logger) Exitln(v ...interface{}) {
+// Fatalln is equivalent to l.Println() followed by a call to os.Exit(1).
+func (l *Logger) Fatalln(v ...interface{}) {
l.Output(2, fmt.Sprintln(v...))
os.Exit(1)
}
@@ -238,20 +238,20 @@ func Println(v ...interface{}) {
std.Output(2, fmt.Sprintln(v...))
}
-// Exit is equivalent to Print() followed by a call to os.Exit(1).
-func Exit(v ...interface{}) {
+// Fatal is equivalent to Print() followed by a call to os.Exit(1).
+func Fatal(v ...interface{}) {
std.Output(2, fmt.Sprint(v...))
os.Exit(1)
}
-// Exitf is equivalent to Printf() followed by a call to os.Exit(1).
-func Exitf(format string, v ...interface{}) {
+// Fatalf is equivalent to Printf() followed by a call to os.Exit(1).
+func Fatalf(format string, v ...interface{}) {
std.Output(2, fmt.Sprintf(format, v...))
os.Exit(1)
}
-// Exitln is equivalent to Println() followed by a call to os.Exit(1).
-func Exitln(v ...interface{}) {
+// Fatalln is equivalent to Println() followed by a call to os.Exit(1).
+func Fatalln(v ...interface{}) {
std.Output(2, fmt.Sprintln(v...))
os.Exit(1)
}