summaryrefslogtreecommitdiffstats
path: root/utils/redirect_std_log_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2018-01-12 08:02:11 -0600
committerJoram Wilander <jwawilander@gmail.com>2018-01-12 09:02:11 -0500
commit7e5ce976681e99be6b26d428935ba1106d530efa (patch)
treee050da49c943bf77f57b03eceb0b650114c7f1b6 /utils/redirect_std_log_test.go
parent3d3a234fca1d2ee43f5c4fc8961d44fde2512c82 (diff)
downloadchat-7e5ce976681e99be6b26d428935ba1106d530efa.tar.gz
chat-7e5ce976681e99be6b26d428935ba1106d530efa.tar.bz2
chat-7e5ce976681e99be6b26d428935ba1106d530efa.zip
Remove global cfg vars (#8099)
* remove global cfg vars * enterprise update
Diffstat (limited to 'utils/redirect_std_log_test.go')
-rw-r--r--utils/redirect_std_log_test.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/utils/redirect_std_log_test.go b/utils/redirect_std_log_test.go
new file mode 100644
index 000000000..cbe55c921
--- /dev/null
+++ b/utils/redirect_std_log_test.go
@@ -0,0 +1,24 @@
+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+package utils
+
+import (
+ "testing"
+ "time"
+)
+
+func TestRedirectStdLog(t *testing.T) {
+ log := NewRedirectStdLog("test", false)
+
+ log.Println("[DEBUG] this is a message")
+ log.Println("[DEBG] this is a message")
+ log.Println("[WARN] this is a message")
+ log.Println("[ERROR] this is a message")
+ log.Println("[EROR] this is a message")
+ log.Println("[ERR] this is a message")
+ log.Println("[INFO] this is a message")
+ log.Println("this is a message")
+
+ time.Sleep(time.Second * 1)
+}