Have multiple dprints

Issue #119 closed
Erik Schnetter created an issue

If there are multiple versions of dprint specifying the intent ("I am going to abort with an error", "this is a severe problem", "warning", "log message"), then one could probably omit the second argument that specifies whether to print the error always. This would be a higher level interface and could make it easier to use.

dabort derror dwarn dlog

Internally, these would just call dprint, depending on the verbosity level and environment settings. For example, dabort would always print, and dwarn would not print if it happens during a non-essential operation. dlog would only print if the verbosity is high.

Keyword:

Comments (2)

  1. anonymous
    • changed status to resolved
    • removed comment

    this is done.

    there is now info, warning, and fatal, along with dprint.

    warning and fatal log to stderr, and only print if simenv.VERBOSE is set to true.

    fatal always prints.

    all three always log.

    --Michael

  2. Log in to comment