summaryrefslogtreecommitdiff
path: root/testrig
diff options
context:
space:
mode:
Diffstat (limited to 'testrig')
-rw-r--r--testrig/config.go23
-rw-r--r--testrig/log.go1
2 files changed, 13 insertions, 11 deletions
diff --git a/testrig/config.go b/testrig/config.go
index c5cbb2c80..a85a88477 100644
--- a/testrig/config.go
+++ b/testrig/config.go
@@ -33,17 +33,18 @@ func InitTestConfig() {
}
var testDefaults = config.Configuration{
- LogLevel: "info",
- LogDbQueries: true,
- ApplicationName: "gotosocial",
- LandingPageUser: "",
- ConfigPath: "",
- Host: "localhost:8080",
- AccountDomain: "localhost:8080",
- Protocol: "http",
- BindAddress: "127.0.0.1",
- Port: 8080,
- TrustedProxies: []string{"127.0.0.1/32", "::1"},
+ LogLevel: "info",
+ LogTimestampFormat: "02/01/2006 15:04:05.000",
+ LogDbQueries: true,
+ ApplicationName: "gotosocial",
+ LandingPageUser: "",
+ ConfigPath: "",
+ Host: "localhost:8080",
+ AccountDomain: "localhost:8080",
+ Protocol: "http",
+ BindAddress: "127.0.0.1",
+ Port: 8080,
+ TrustedProxies: []string{"127.0.0.1/32", "::1"},
DbType: "sqlite",
DbAddress: ":memory:",
diff --git a/testrig/log.go b/testrig/log.go
index 2761eb3f8..439ed72b0 100644
--- a/testrig/log.go
+++ b/testrig/log.go
@@ -26,6 +26,7 @@ import (
// InitTestLog sets the global logger to trace level for logging
func InitTestLog() {
+ log.SetTimeFormat(config.GetLogTimestampFormat())
// Set the global log level from configuration
if err := log.ParseLevel(config.GetLogLevel()); err != nil {
log.Panicf(nil, "error parsing log level: %v", err)