Skip to content

Commit

Permalink
Stop MultiLogConfigFromFile() crashing on empty file
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Percival committed Nov 14, 2017
1 parent afccd4b commit 62023ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trillian/ctfe/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func MultiLogConfigFromFile(filename string) (*configpb.LogMultiConfig, error) {
return nil, fmt.Errorf("failed to parse multi-backend log config: %v", err)
}

if len(cfg.LogConfigs.Config) == 0 || len(cfg.Backends.Backend) == 0 {
if len(cfg.LogConfigs.GetConfig()) == 0 || len(cfg.Backends.GetBackend()) == 0 {
return nil, errors.New("config is missing backends and/or log configs")
}
return &cfg, nil
Expand Down

0 comments on commit 62023ed

Please sign in to comment.