summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/client.go6
-rw-r--r--model/config.go11
2 files changed, 12 insertions, 5 deletions
diff --git a/model/client.go b/model/client.go
index 317374d36..e648ca279 100644
--- a/model/client.go
+++ b/model/client.go
@@ -14,8 +14,6 @@ import (
"strconv"
"strings"
"time"
-
- l4g "github.com/alecthomas/log4go"
)
var UsedApiV3 *int32 = new(int32)
@@ -210,7 +208,7 @@ func getCookie(name string, resp *http.Response) *http.Cookie {
// Must is a convenience function used for testing.
func (c *Client) Must(result *Result, err *AppError) *Result {
if err != nil {
- l4g.Close()
+
time.Sleep(time.Second)
panic(err)
}
@@ -221,7 +219,7 @@ func (c *Client) Must(result *Result, err *AppError) *Result {
// MustGeneric is a convenience function used for testing.
func (c *Client) MustGeneric(result interface{}, err *AppError) interface{} {
if err != nil {
- l4g.Close()
+
time.Sleep(time.Second)
panic(err)
}
diff --git a/model/config.go b/model/config.go
index fb43dea42..5074b7637 100644
--- a/model/config.go
+++ b/model/config.go
@@ -585,9 +585,10 @@ func (s *SqlSettings) SetDefaults() {
type LogSettings struct {
EnableConsole bool
ConsoleLevel string
+ ConsoleJson *bool
EnableFile bool
FileLevel string
- FileFormat string
+ FileJson *bool
FileLocation string
EnableWebhookDebugging bool
EnableDiagnostics *bool
@@ -597,6 +598,14 @@ func (s *LogSettings) SetDefaults() {
if s.EnableDiagnostics == nil {
s.EnableDiagnostics = NewBool(true)
}
+
+ if s.ConsoleJson == nil {
+ s.ConsoleJson = NewBool(true)
+ }
+
+ if s.FileJson == nil {
+ s.FileJson = NewBool(true)
+ }
}
type PasswordSettings struct {