Skip to content

Unify logging #146

Open
Open
@matthijskooijman

Description

@matthijskooijman

Currently, there are a few ways in which the logging happens, or can be influenced:

  • There is a Logger instance, that can output human-readable or structured log entries (I think the latter are read by the IDE and parsed in some way?). Each of these log entries has a log level, which is currently ignored for at least the human readable logger.
  • There is a -verbose flag that enables printing of commands and some other verboseness
  • There is a -debug-level flag that sets a debug level, of which it seems that only level 0, level 5 and level 10 actually change the output.

It seems sane to have a single log level option, which defines how much output is shown. The current -verbose and -debug-level flags can probably be converted into a value in that log level.

Also, there are currently some things printed unconditionally, even with no debug level or verbose mode set. When running go test without -v, you might want to suppress this output altogether, to make it easier to list failed testcases, without hiding them in informational output. This could be implemented using this single log level, by adding a "NONE" log level that suppresses all output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: enhancementProposed improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions