Replace all instances of wwlog.Printf
wwlog provides named loggers for each level, which requires less code and is clearer than wwlog.Printf. The code has included a mix of both, but this commit consolidates existing code on the per-level functions. Signed-off-by: Jonathon Anderson <janderson@ciq.co>
This commit is contained in:
@@ -14,13 +14,13 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
|
||||
nodeDB, err := node.New()
|
||||
if err != nil {
|
||||
wwlog.Printf(wwlog.ERROR, "Could not open node configuration: %s\n", err)
|
||||
wwlog.Error("Could not open node configuration: %s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
profiles, err := nodeDB.FindAllProfiles()
|
||||
if err != nil {
|
||||
wwlog.Printf(wwlog.ERROR, "Could not find all nodes: %s\n", err)
|
||||
wwlog.Error("Could not find all nodes: %s\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user