It's too hard to enable all log messages

Bug #1256015 reported by Roger Peppe on 2013-11-28
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
loggo
Undecided
Unassigned

Bug Description

To enable all log messages, it seems like this is the necessary incantation:

 loggo.GetLogger("").SetLogLevel(loggo.TRACE)
 writer, _, err := loggo.RemoveWriter("default")
 if err != nil {
  panic(fmt.Errorf("cannot remove writer: %v", err))
 }
 loggo.RegisterWriter("default", writer, loggo.TRACE)

even with the error checking removed, this is still about two lines
too long, and unintuitive.

It would be preferable if the default was to print all log messages;
it's easier to restrict message flow where appropriate than
enable it (only one thing is strictly necessary), and it makes for a nicer initial user experience.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers