summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/v5/mlog/default.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-10-19 23:40:00 +0200
committerGitHub <noreply@github.com>2020-10-19 23:40:00 +0200
commit075a84427f6332aab707d283ad770d69f8816032 (patch)
tree0ff9f56a057919f3fe968e57f6f0b1c0d1f85078 /vendor/github.com/mattermost/mattermost-server/v5/mlog/default.go
parent950f2759bd2b20aa0bdedc3dc9a74d0dafb606d8 (diff)
downloadmatterbridge-msglm-075a84427f6332aab707d283ad770d69f8816032.tar.gz
matterbridge-msglm-075a84427f6332aab707d283ad770d69f8816032.tar.bz2
matterbridge-msglm-075a84427f6332aab707d283ad770d69f8816032.zip
Update vendor (#1265)
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v5/mlog/default.go')
-rw-r--r--vendor/github.com/mattermost/mattermost-server/v5/mlog/default.go44
1 files changed, 44 insertions, 0 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v5/mlog/default.go b/vendor/github.com/mattermost/mattermost-server/v5/mlog/default.go
index f356eec7..1e409b19 100644
--- a/vendor/github.com/mattermost/mattermost-server/v5/mlog/default.go
+++ b/vendor/github.com/mattermost/mattermost-server/v5/mlog/default.go
@@ -4,9 +4,13 @@
package mlog
import (
+ "context"
"encoding/json"
+ "errors"
"fmt"
"os"
+
+ "github.com/mattermost/logr"
)
// defaultLog manually encodes the log to STDERR, providing a basic, default logging implementation
@@ -49,3 +53,43 @@ func defaultCriticalLog(msg string, fields ...Field) {
// We map critical to error in zap, so be consistent.
defaultLog("error", msg, fields...)
}
+
+func defaultCustomLog(lvl LogLevel, msg string, fields ...Field) {
+ // custom log levels are only output once log targets are configured.
+}
+
+func defaultCustomMultiLog(lvl []LogLevel, msg string, fields ...Field) {
+ // custom log levels are only output once log targets are configured.
+}
+
+func defaultFlush(ctx context.Context) error {
+ return nil
+}
+
+func defaultAdvancedConfig(cfg LogTargetCfg) error {
+ // mlog.ConfigAdvancedConfig should not be called until default
+ // logger is replaced with mlog.Logger instance.
+ return errors.New("cannot config advanced logging on default logger")
+}
+
+func defaultAdvancedShutdown(ctx context.Context) error {
+ return nil
+}
+
+func defaultAddTarget(targets ...logr.Target) error {
+ // mlog.AddTarget should not be called until default
+ // logger is replaced with mlog.Logger instance.
+ return errors.New("cannot AddTarget on default logger")
+}
+
+func defaultRemoveTargets(ctx context.Context, f func(TargetInfo) bool) error {
+ // mlog.RemoveTargets should not be called until default
+ // logger is replaced with mlog.Logger instance.
+ return errors.New("cannot RemoveTargets on default logger")
+}
+
+func defaultEnableMetrics(collector logr.MetricsCollector) error {
+ // mlog.EnableMetrics should not be called until default
+ // logger is replaced with mlog.Logger instance.
+ return errors.New("cannot EnableMetrics on default logger")
+}