feat: use Zerolog for logging.

This commit is contained in:
Antoine Aflalo
2025-08-26 20:55:34 -04:00
parent d0e4037e15
commit dfee46812d
6 changed files with 42 additions and 19 deletions

View File

@@ -2,6 +2,7 @@ package commands
import (
"fmt"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"os"
@@ -53,8 +54,7 @@ func init() {
// Execute executes the root command.
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
log.Fatal().Err(err).Msg("Command execution failed")
}
}
func AddCommand(cmd *cobra.Command) {