Skip to content

Commit

Permalink
initialize logger correctly
Browse files Browse the repository at this point in the history
Signed-off-by: MUzairS15 <[email protected]>
  • Loading branch information
MUzairS15 committed Oct 4, 2024
1 parent 7b9a2a0 commit e6b8109
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/kanvas-snapshot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var generateKanvasSnapshotCmd = &cobra.Command{
-h Help for Helm Kanvas Snapshot plugin`,

RunE: func(cmd *cobra.Command, args []string) error {
Log = log.SetupMeshkitLogger("helm-kanvas-snapshot", false, os.Stdout)

// Use the extracted name from URI if not provided
if designName == "" {
designName = ExtractNameFromURI(chartURI)
Expand Down Expand Up @@ -267,3 +267,9 @@ func main() {
}

}

func init() {
cobra.OnInitialize(func() {
Log = log.SetupMeshkitLogger("helm-kanvas-snapshot", false, os.Stdout)
})
}

0 comments on commit e6b8109

Please sign in to comment.