Skip to content

Commit

Permalink
env
Browse files Browse the repository at this point in the history
  • Loading branch information
yeabow committed Aug 12, 2021
1 parent 05f83b4 commit 3623588
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cat/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type Config struct {

type XMLConfig struct {
Name xml.Name `xml:"config"`
Env string `xml:"env"`
BaseLogDir string `xml:"base-log-dir"`
Servers XMLConfigServers `xml:"servers"`
}
Expand Down Expand Up @@ -112,6 +113,10 @@ func loadXmlConfig(c XMLConfig) (err error) {
}
}

if c.Env != "" {
config.env = c.Env
}

logger.changeLogFile()

for _, x := range c.Servers.Servers {
Expand Down

0 comments on commit 3623588

Please sign in to comment.