Browse Source

fix: log level settings

v1.x.x
dnomd343 2 years ago
parent
commit
ec41861e77
  1. 4
      cmd/config/decode.go
  2. 3
      cmd/proxy/config.go
  3. 2
      cmd/proxy/main.go

4
cmd/config/decode.go

@ -13,8 +13,8 @@ import (
)
type NetConfig struct {
Gateway string `yaml:"gateway"` // network gateway
Address string `yaml:"address"` // network address
Gateway string `yaml:"gateway" json:"gateway"` // network gateway
Address string `yaml:"address" json:"address"` // network address
}
type RawConfig struct {

3
cmd/proxy/config.go

@ -44,6 +44,9 @@ type inboundObject struct {
}
func loadLogConfig(logLevel string, logDir string) string {
if logLevel == "" {
logLevel = "warning" // using warning level without log output
}
if logLevel != "debug" && logLevel != "info" &&
logLevel != "warning" && logLevel != "error" && logLevel != "none" {
log.Warningf("Unknown log level -> %s", logLevel)

2
cmd/proxy/main.go

@ -7,7 +7,7 @@ import (
)
type Config struct {
Log string `yaml:"log" json:"json"`
Log string `yaml:"log" json:"log"`
Core string `yaml:"core" json:"core"`
Http map[string]int `yaml:"http" json:"http"`
Socks map[string]int `yaml:"socks" json:"socks"`

Loading…
Cancel
Save