debug
This commit is contained in:
@ -10,6 +10,10 @@ func Log(msg string, i ...interface{}) {
|
|||||||
revel.AppLog.Info(msg, i...)
|
revel.AppLog.Info(msg, i...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Logf(msg string, i ...interface{}) {
|
||||||
|
revel.AppLog.Infof(msg, i...)
|
||||||
|
}
|
||||||
|
|
||||||
func LogW(msg string, i ...interface{}) {
|
func LogW(msg string, i ...interface{}) {
|
||||||
revel.AppLog.Warn(msg, i...)
|
revel.AppLog.Warn(msg, i...)
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
. "github.com/leanote/leanote/app/lea"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -146,15 +147,15 @@ func loadMessageFile(locale string, path string, info os.FileInfo, osError error
|
|||||||
// If we have already parsed a message file for this locale, merge both
|
// If we have already parsed a message file for this locale, merge both
|
||||||
if _, exists := messages[locale]; exists {
|
if _, exists := messages[locale]; exists {
|
||||||
messages[locale].Merge(config)
|
messages[locale].Merge(config)
|
||||||
revel.TRACE.Printf("Successfully merged messages for locale '%s'", locale)
|
Logf("Successfully merged messages for locale '%s'", locale)
|
||||||
} else {
|
} else {
|
||||||
messages[locale] = config
|
messages[locale] = config
|
||||||
}
|
}
|
||||||
|
|
||||||
revel.TRACE.Println("Successfully loaded messages from file", info.Name())
|
Logf("Successfully loaded messages from file", info.Name())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
revel.TRACE.Printf("Ignoring file %s because it did not have a valid extension", info.Name())
|
Logf("Ignoring file %s because it did not have a valid extension", info.Name())
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Reference in New Issue
Block a user