summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/mlog/default.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-08-10 00:29:54 +0200
committerGitHub <noreply@github.com>2020-08-10 00:29:54 +0200
commit4e50fd864921c556988c919269448efdb90fa961 (patch)
treea3625f03f8de3c4f3841364000a4ea3aa42c1533 /vendor/github.com/mattermost/mattermost-server/mlog/default.go
parentdfdffa0027334e55ce213fc6eb62206dbf48baf6 (diff)
downloadmatterbridge-msglm-4e50fd864921c556988c919269448efdb90fa961.tar.gz
matterbridge-msglm-4e50fd864921c556988c919269448efdb90fa961.tar.bz2
matterbridge-msglm-4e50fd864921c556988c919269448efdb90fa961.zip
Use mattermost v5 module (#1192)
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/mlog/default.go')
-rw-r--r--vendor/github.com/mattermost/mattermost-server/mlog/default.go50
1 files changed, 0 insertions, 50 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/mlog/default.go b/vendor/github.com/mattermost/mattermost-server/mlog/default.go
deleted file mode 100644
index 366d22f8..00000000
--- a/vendor/github.com/mattermost/mattermost-server/mlog/default.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-package mlog
-
-import (
- "encoding/json"
- "fmt"
-)
-
-// defaultLog manually encodes the log to STDOUT, providing a basic, default logging implementation
-// before mlog is fully configured.
-func defaultLog(level, msg string, fields ...Field) {
- log := struct {
- Level string `json:"level"`
- Message string `json:"msg"`
- Fields []Field `json:"fields,omitempty"`
- }{
- level,
- msg,
- fields,
- }
-
- if b, err := json.Marshal(log); err != nil {
- fmt.Printf(`{"level":"error","msg":"failed to encode log message"}%s`, "\n")
- } else {
- fmt.Printf("%s\n", b)
- }
-}
-
-func defaultDebugLog(msg string, fields ...Field) {
- defaultLog("debug", msg, fields...)
-}
-
-func defaultInfoLog(msg string, fields ...Field) {
- defaultLog("info", msg, fields...)
-}
-
-func defaultWarnLog(msg string, fields ...Field) {
- defaultLog("warn", msg, fields...)
-}
-
-func defaultErrorLog(msg string, fields ...Field) {
- defaultLog("error", msg, fields...)
-}
-
-func defaultCriticalLog(msg string, fields ...Field) {
- // We map critical to error in zap, so be consistent.
- defaultLog("error", msg, fields...)
-}