refactor: added more logging info

This commit is contained in:
David Allen 2024-12-12 14:29:41 -07:00
parent e1ab1e7102
commit 9951b9a1f3
Signed by: towk
GPG key ID: 793B2924A49B3A3F
2 changed files with 11 additions and 14 deletions

View file

@ -212,7 +212,7 @@ func GenerateWithTarget(config *config.Config, target string) (FileMap, error) {
// load target information from config
targetInfo, ok = config.Targets[target]
if !ok {
log.Warn().Msg("target not found in config")
log.Warn().Str("target", target).Msg("target not found in config")
}
// if no plugin supplied in config target, then using the target supplied
@ -224,7 +224,7 @@ func GenerateWithTarget(config *config.Config, target string) (FileMap, error) {
generator, ok = DefaultGenerators[target]
if !ok {
// only load the plugin needed for this target if we don't find default
log.Error().Msg("could not find target in default generators")
log.Warn().Str("target", target).Msg("could not find target in default generators")
generator, err = LoadPlugin(targetInfo.Plugin)
if err != nil {
return nil, fmt.Errorf("failed to load plugin: %v", err)