diff --git a/logging/hclog_adapter_test.go b/logging/hclog_adapter_test.go index 7ac2c78d..48fc1b4e 100644 --- a/logging/hclog_adapter_test.go +++ b/logging/hclog_adapter_test.go @@ -3,6 +3,7 @@ package logging import ( "context" "testing" + "time" "github.com/gatewayd-io/gatewayd/config" "github.com/hashicorp/go-hclog" @@ -20,7 +21,7 @@ func TestNewHcLogAdapter(t *testing.T) { Output: []config.LogOutput{config.Console}, Level: zerolog.TraceLevel, TimeFormat: zerolog.TimeFormatUnix, - ConsoleTimeFormat: config.DefaultConsoleTimeFormat, + ConsoleTimeFormat: time.RFC3339, NoColor: true, }, ) diff --git a/logging/logger_test.go b/logging/logger_test.go index ea9444ca..1e6ab381 100644 --- a/logging/logger_test.go +++ b/logging/logger_test.go @@ -4,6 +4,7 @@ import ( "context" "os" "testing" + "time" "github.com/gatewayd-io/gatewayd/config" "github.com/rs/zerolog" @@ -40,7 +41,7 @@ func TestNewLogger_File(t *testing.T) { LoggerConfig{ Output: []config.LogOutput{config.File}, FileName: "gatewayd.log", - ConsoleTimeFormat: config.DefaultConsoleTimeFormat, + ConsoleTimeFormat: time.RFC3339, MaxSize: config.DefaultMaxSize, MaxBackups: config.DefaultMaxBackups, MaxAge: config.DefaultMaxAge, diff --git a/metrics/merger_test.go b/metrics/merger_test.go index 8edb17d8..a792ecdf 100644 --- a/metrics/merger_test.go +++ b/metrics/merger_test.go @@ -22,7 +22,7 @@ func TestMerger(t *testing.T) { logging.LoggerConfig{ Output: []config.LogOutput{config.Console}, TimeFormat: zerolog.TimeFormatUnix, - ConsoleTimeFormat: config.DefaultConsoleTimeFormat, + ConsoleTimeFormat: time.RFC3339, Level: zerolog.InfoLevel, NoColor: true, }, diff --git a/network/client_test.go b/network/client_test.go index 2ae1d18a..e82917ba 100644 --- a/network/client_test.go +++ b/network/client_test.go @@ -3,6 +3,7 @@ package network import ( "context" "testing" + "time" "github.com/gatewayd-io/gatewayd/config" "github.com/gatewayd-io/gatewayd/logging" @@ -17,7 +18,7 @@ func CreateNewClient(t *testing.T) *Client { logger := logging.NewLogger(context.Background(), logging.LoggerConfig{ Output: []config.LogOutput{config.Console}, TimeFormat: zerolog.TimeFormatUnix, - ConsoleTimeFormat: config.DefaultConsoleTimeFormat, + ConsoleTimeFormat: time.RFC3339, Level: zerolog.DebugLevel, NoColor: true, }) diff --git a/network/proxy_test.go b/network/proxy_test.go index e1603e83..b7a50c29 100644 --- a/network/proxy_test.go +++ b/network/proxy_test.go @@ -3,6 +3,7 @@ package network import ( "context" "testing" + "time" "github.com/gatewayd-io/gatewayd/config" "github.com/gatewayd-io/gatewayd/logging" @@ -17,7 +18,7 @@ func TestNewProxy(t *testing.T) { logger := logging.NewLogger(context.Background(), logging.LoggerConfig{ Output: []config.LogOutput{config.Console}, TimeFormat: zerolog.TimeFormatUnix, - ConsoleTimeFormat: config.DefaultConsoleTimeFormat, + ConsoleTimeFormat: time.RFC3339, Level: zerolog.DebugLevel, NoColor: true, }) @@ -80,7 +81,7 @@ func TestNewProxyElastic(t *testing.T) { logger := logging.NewLogger(context.Background(), logging.LoggerConfig{ Output: []config.LogOutput{config.Console}, TimeFormat: zerolog.TimeFormatUnix, - ConsoleTimeFormat: config.DefaultConsoleTimeFormat, + ConsoleTimeFormat: time.RFC3339, Level: zerolog.DebugLevel, NoColor: true, }) diff --git a/network/server_test.go b/network/server_test.go index 86d4c6e9..9665469e 100644 --- a/network/server_test.go +++ b/network/server_test.go @@ -7,6 +7,7 @@ import ( "io" "os" "testing" + "time" v1 "github.com/gatewayd-io/gatewayd-plugin-sdk/plugin/v1" "github.com/gatewayd-io/gatewayd/config" @@ -29,7 +30,7 @@ func TestRunServer(t *testing.T) { config.File, }, TimeFormat: zerolog.TimeFormatUnix, - ConsoleTimeFormat: config.DefaultConsoleTimeFormat, + ConsoleTimeFormat: time.RFC3339, Level: zerolog.DebugLevel, NoColor: true, FileName: "server_test.log", diff --git a/network/utils_test.go b/network/utils_test.go index 4fb8b374..6fe5e595 100644 --- a/network/utils_test.go +++ b/network/utils_test.go @@ -3,6 +3,7 @@ package network import ( "context" "testing" + "time" "github.com/gatewayd-io/gatewayd/config" "github.com/gatewayd-io/gatewayd/logging" @@ -15,7 +16,7 @@ func TestGetID(t *testing.T) { cfg := logging.LoggerConfig{ Output: []config.LogOutput{config.Console}, TimeFormat: zerolog.TimeFormatUnix, - ConsoleTimeFormat: config.DefaultConsoleTimeFormat, + ConsoleTimeFormat: time.RFC3339, Level: zerolog.DebugLevel, NoColor: true, } @@ -30,7 +31,7 @@ func TestResolve(t *testing.T) { cfg := logging.LoggerConfig{ Output: []config.LogOutput{config.Console}, TimeFormat: zerolog.TimeFormatUnix, - ConsoleTimeFormat: config.DefaultConsoleTimeFormat, + ConsoleTimeFormat: time.RFC3339, Level: zerolog.DebugLevel, NoColor: true, } diff --git a/plugin/plugin_registry_test.go b/plugin/plugin_registry_test.go index 19c78ec5..ab73342b 100644 --- a/plugin/plugin_registry_test.go +++ b/plugin/plugin_registry_test.go @@ -3,6 +3,7 @@ package plugin import ( "context" "testing" + "time" sdkPlugin "github.com/gatewayd-io/gatewayd-plugin-sdk/plugin" v1 "github.com/gatewayd-io/gatewayd-plugin-sdk/plugin/v1" @@ -19,7 +20,7 @@ func NewPluginRegistry(t *testing.T) *Registry { cfg := logging.LoggerConfig{ Output: []config.LogOutput{config.Console}, TimeFormat: zerolog.TimeFormatUnix, - ConsoleTimeFormat: config.DefaultConsoleTimeFormat, + ConsoleTimeFormat: time.RFC3339, Level: zerolog.DebugLevel, NoColor: true, }