Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-09-08 17:04:04 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-09-08 17:18:11 +0300
commitfe0c270577325dcd08d5e21faa42c5288a205f93 (patch)
treeeb2b17eb9b7cfdf6220f53a72c8859c5d6f71b0e /helpers
parent5ef45bec63b157eb8e1bd3a6a4c6cb1e98a43a94 (diff)
Reset the i18n func map on reload
Also improve the error message on missing resource bundles.
Diffstat (limited to 'helpers')
-rw-r--r--helpers/general.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/helpers/general.go b/helpers/general.go
index 2237125d7..7fac7cb59 100644
--- a/helpers/general.go
+++ b/helpers/general.go
@@ -229,6 +229,11 @@ func NewDistinctFeedbackLogger() *DistinctLogger {
// DistinctErrorLog cann be used to avoid spamming the logs with errors.
var DistinctErrorLog = NewDistinctErrorLogger()
+// InitLoggers sets up the global distinct loggers.
+func InitLoggers() {
+ DistinctErrorLog = NewDistinctErrorLogger()
+}
+
// Deprecated logs ERROR logs about a deprecation, but only once for a given set of arguments' values.
func Deprecated(object, item, alternative string) {
// deprecatedLogger.Printf("%s's %s is deprecated and will be removed in Hugo %s. Use %s instead.", object, item, NextHugoReleaseVersion(), alternative)