aboutsummaryrefslogtreecommitdiffstats
path: root/log.go
diff options
context:
space:
mode:
authorFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-25 17:16:25 +0900
committerFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-25 17:16:25 +0900
commit07cf121a33d705ad1051fff1d4e6af10ab9663ec (patch)
treef2b6a4e4d933c7df46700802879863a06e4bd12e /log.go
parent08eda65a3991784729bd77d0d463ec108fda414c (diff)
downloadplatform_build_kati-07cf121a33d705ad1051fff1d4e6af10ab9663ec.tar.gz
platform_build_kati-07cf121a33d705ad1051fff1d4e6af10ab9663ec.tar.bz2
platform_build_kati-07cf121a33d705ad1051fff1d4e6af10ab9663ec.zip
unexport Logf, LogAlways, Warn*, Error*
Diffstat (limited to 'log.go')
-rw-r--r--log.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/log.go b/log.go
index 514ff9b..1138b30 100644
--- a/log.go
+++ b/log.go
@@ -23,7 +23,7 @@ import (
var logMu sync.Mutex
-func LogAlways(f string, a ...interface{}) {
+func logAlways(f string, a ...interface{}) {
var buf bytes.Buffer
buf.WriteString("*kati*: ")
buf.WriteString(f)
@@ -37,22 +37,22 @@ func LogStats(f string, a ...interface{}) {
if !LogFlag && !StatsFlag {
return
}
- LogAlways(f, a...)
+ logAlways(f, a...)
}
-func Logf(f string, a ...interface{}) {
+func logf(f string, a ...interface{}) {
if !LogFlag {
return
}
- LogAlways(f, a...)
+ logAlways(f, a...)
}
-func Warn(filename string, lineno int, f string, a ...interface{}) {
+func warn(filename string, lineno int, f string, a ...interface{}) {
f = fmt.Sprintf("%s:%d: warning: %s\n", filename, lineno, f)
fmt.Printf(f, a...)
}
-func WarnNoPrefix(filename string, lineno int, f string, a ...interface{}) {
+func warnNoPrefix(filename string, lineno int, f string, a ...interface{}) {
f = fmt.Sprintf("%s:%d: %s\n", filename, lineno, f)
fmt.Printf(f, a...)
}
@@ -63,12 +63,12 @@ func AtError(f func()) {
atErrors = append(atErrors, f)
}
-func Error(filename string, lineno int, f string, a ...interface{}) {
+func errorExit(filename string, lineno int, f string, a ...interface{}) {
f = fmt.Sprintf("%s:%d: %s", filename, lineno, f)
- ErrorNoLocation(f, a...)
+ errorNoLocationExit(f, a...)
}
-func ErrorNoLocation(f string, a ...interface{}) {
+func errorNoLocationExit(f string, a ...interface{}) {
f = fmt.Sprintf("%s\n", f)
fmt.Printf(f, a...)
for i := len(atErrors) - 1; i >= 0; i-- {