summaryrefslogtreecommitdiffstats
path: root/app/license.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-04-27 12:49:45 -0700
committerGitHub <noreply@github.com>2018-04-27 12:49:45 -0700
commit686c2fbab7607d42183ae685a27ea3d7dce8c3f6 (patch)
tree53ed73cada57bc43f342ac10e2f842cddb095218 /app/license.go
parent2acbc77d78456d7ba76ceb687b18985d7d92f814 (diff)
downloadchat-686c2fbab7607d42183ae685a27ea3d7dce8c3f6.tar.gz
chat-686c2fbab7607d42183ae685a27ea3d7dce8c3f6.tar.bz2
chat-686c2fbab7607d42183ae685a27ea3d7dce8c3f6.zip
Structured logging (#8673)
* Implementing structured logging * Changes to en.json to allow refactor to run. * Fixing global logger * Structured logger initalization. * Add caller. * Do some log redirection. * Auto refactor * Cleaning up l4g reference and removing dependancy. * Removing junk. * Copyright headers. * Fixing tests * Revert "Changes to en.json to allow refactor to run." This reverts commit fd8249e99bcad0231e6ea65cd77c32aae9a54026. * Fixing some auto refactor strangeness and typo. * Making keys more human readable.
Diffstat (limited to 'app/license.go')
-rw-r--r--app/license.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/license.go b/app/license.go
index 148b10317..310a61fdb 100644
--- a/app/license.go
+++ b/app/license.go
@@ -9,8 +9,7 @@ import (
"net/http"
"strings"
- l4g "github.com/alecthomas/log4go"
-
+ "github.com/mattermost/mattermost-server/mlog"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/utils"
)
@@ -30,7 +29,7 @@ func (a *App) LoadLicense() {
if license != nil {
if _, err := a.SaveLicense(licenseBytes); err != nil {
- l4g.Info("Failed to save license key loaded from disk err=%v", err.Error())
+ mlog.Info(fmt.Sprintf("Failed to save license key loaded from disk err=%v", err.Error()))
} else {
licenseId = license.Id
}
@@ -40,9 +39,9 @@ func (a *App) LoadLicense() {
if result := <-a.Srv.Store.License().Get(licenseId); result.Err == nil {
record := result.Data.(*model.LicenseRecord)
a.ValidateAndSetLicenseBytes([]byte(record.Bytes))
- l4g.Info("License key valid unlocking enterprise features.")
+ mlog.Info("License key valid unlocking enterprise features.")
} else {
- l4g.Info(utils.T("mattermost.load_license.find.warn"))
+ mlog.Info("License key from https://mattermost.com required to unlock enterprise features.")
}
}
@@ -140,7 +139,7 @@ func (a *App) ValidateAndSetLicenseBytes(b []byte) {
return
}
- l4g.Warn(utils.T("utils.license.load_license.invalid.warn"))
+ mlog.Warn("No valid enterprise license found")
}
func (a *App) SetClientLicense(m map[string]string) {