This is a proposal for logging improvement. Currently, we have slight inconsistencies with lines like this:
log.Printf("%s Setting notifications %s error: %s", internal.ErrorPrefix, flagText, err) // prefix formatted in
log.Printf(internal.ErrorPrefix+" Setting notifications %s error: %s", flagText, err) // prefix prepended to the format str
log.Printf("Setting notifications %s error: %s", flagText, err) // no prefix
log.Printf("Setting notifications %s error: %s", flagText, err) // no new line at the end
log.Printf("Setting notifications") // no formatting
log.Prinln("Setting notifications error: ", err) // redundant space after "error:"
This PR introduces logging functions which take care of the log prefix. The next step will be to migrate the codebase and fix inconsistencies.
This is a proposal for logging improvement. Currently, we have slight inconsistencies with lines like this:
This PR introduces logging functions which take care of the log prefix. The next step will be to migrate the codebase and fix inconsistencies.