summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/sirupsen/logrus/exported.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-09-28 12:40:17 -0700
committerGitHub <noreply@github.com>2018-09-28 12:40:17 -0700
commita8c01377bce777bf1940850e390e587c290e98e0 (patch)
tree0e176269b5faae110bb402b209d4f192654a435c /vendor/github.com/sirupsen/logrus/exported.go
parent006623e0f737ca7ee5d482fe47c09048a6f3d06a (diff)
downloadchat-a8c01377bce777bf1940850e390e587c290e98e0.tar.gz
chat-a8c01377bce777bf1940850e390e587c290e98e0.tar.bz2
chat-a8c01377bce777bf1940850e390e587c290e98e0.zip
Updating server dependancies. (#9498)
Diffstat (limited to 'vendor/github.com/sirupsen/logrus/exported.go')
-rw-r--r--vendor/github.com/sirupsen/logrus/exported.go19
1 files changed, 8 insertions, 11 deletions
diff --git a/vendor/github.com/sirupsen/logrus/exported.go b/vendor/github.com/sirupsen/logrus/exported.go
index eb612a6f3..fb2a7a1f0 100644
--- a/vendor/github.com/sirupsen/logrus/exported.go
+++ b/vendor/github.com/sirupsen/logrus/exported.go
@@ -21,30 +21,27 @@ func SetOutput(out io.Writer) {
// SetFormatter sets the standard logger formatter.
func SetFormatter(formatter Formatter) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Formatter = formatter
+ std.SetFormatter(formatter)
}
// SetLevel sets the standard logger level.
func SetLevel(level Level) {
- std.mu.Lock()
- defer std.mu.Unlock()
std.SetLevel(level)
}
// GetLevel returns the standard logger level.
func GetLevel() Level {
- std.mu.Lock()
- defer std.mu.Unlock()
- return std.level()
+ return std.GetLevel()
+}
+
+// IsLevelEnabled checks if the log level of the standard logger is greater than the level param
+func IsLevelEnabled(level Level) bool {
+ return std.IsLevelEnabled(level)
}
// AddHook adds a hook to the standard logger hooks.
func AddHook(hook Hook) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Hooks.Add(hook)
+ std.AddHook(hook)
}
// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.