add log msg if yang parsing fails
@@ -63,7 +63,8 @@ var promptModeCmd = &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) error {
err := generateYangSchema(promptDirs, promptFiles, promptExcluded)
if err != nil {
- if viper.GetBool("log") {
+ logger.Printf("failed to load paths from yang: %v", err)
+ if !viper.GetBool("log") {
fmt.Fprintf(os.Stderr, "ERR: failed to load paths from yang: %v\n", err)
}
}
