http://qs321.pair.com?node_id=1186644


in reply to Re^3: Choosing a log level
in thread Choosing a log level

I suspect we agree on this, and the difference in in the perspective:

Putting Garbage in the INFO, vs the INFO being full of Garbage. INFO would be useful if you only put useful info in.

The "cutesy" things which are nominally reproducible given the program's inputs, IMO, should be strictly at DEBUG level and are only useful when you haven't done enough work on the code yet to predict the behaviour with confidence.

I usually have those as simple console printing, and then outright delete them when I'm done the first draft of the code and have settled on data structures and variable names. A small few may stick around to serve as progress bars, but those strings end in \r instead of \n so they aren't spammy.

Replies are listed 'Best First'.
Re^5: Choosing a log level
by BrowserUk (Pope) on Mar 31, 2017 at 20:14 UTC
    I suspect we agree on this, and the difference in in the perspective:

    Yes. I think we do.

    I usually have those as simple console printing, and then outright delete them when I'm done the first draft of the code and have settled on data structures and variable names. A small few may stick around to serve as progress bars, but those strings end in \r instead of \n so they aren't spammy.

    I also tend to delete debug trace when I'm done with it. (And have been known to leave a few sitting around as a "somethings happening" indicator.)


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
    In the absence of evidence, opinion is indistinguishable from prejudice.