Add logging config and add some helper functions

This commit is contained in:
Gary Kramlich
2021-11-20 04:58:59 -06:00
parent e27846c25b
commit 8086ad1708
5 changed files with 125 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ type Config struct {
Homeserver homeserver `yaml:"homeserver"`
Appservice appservice `yaml:"appservice"`
Bridge bridge `yaml:"bridge"`
Logging logging `yaml:"logging"`
}
func (cfg *Config) validate() error {
@@ -25,6 +26,10 @@ func (cfg *Config) validate() error {
return err
}
if err := cfg.Logging.validate(); err != nil {
return err
}
return nil
}