Skip to content

Commit 459d1cd

Browse files
OliverOliver
authored andcommitted
feat(conf): rename files and set LogToStdout + LogTimeFormat
1 parent 895979c commit 459d1cd

4 files changed

Lines changed: 8 additions & 1 deletion

File tree

File renamed without changes.
File renamed without changes.
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"os"
1212
"reflect"
1313
"strings"
14+
"time"
1415

1516
"github.com/goccy/go-yaml"
1617
"github.com/lynxai-team/garcon/gerr"
@@ -54,10 +55,16 @@ func (cfg *Cfg) GenLlamaSwapYAML(verbose, debug bool) ([]byte, error) {
5455
switch {
5556
case debug:
5657
cfg.Swap.LogLevel = "debug"
58+
cfg.Swap.LogToStdout = config.LogToStdoutBoth
59+
cfg.Swap.LogTimeFormat = "2006-01-02 15:04:05.999"
5760
case verbose:
5861
cfg.Swap.LogLevel = "info"
62+
cfg.Swap.LogToStdout = config.LogToStdoutBoth
63+
cfg.Swap.LogTimeFormat = time.DateTime
5964
default:
60-
cfg.Swap.LogLevel = "warn"
65+
cfg.Swap.LogLevel = "info"
66+
cfg.Swap.LogToStdout = config.LogToStdoutUpstream
67+
cfg.Swap.LogTimeFormat = time.DateTime
6168
}
6269

6370
// HealthCheckTimeout has some limitations:

0 commit comments

Comments
 (0)