Add logging config and add some helper functions
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user