It's too hard to enable all log messages

Bug #1256015 reported by Roger Peppe
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
loggo
New
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.