Robert Haas <robertmh...@gmail.com> writes: > On Thu, Mar 24, 2022 at 9:19 AM Dagfinn Ilmari Mannsåker > <ilm...@ilmari.org> wrote: >> Per the TAP protocol, every line of non-test-result output should be >> prefixed by "# ". The note() function does this for you, see >> https://metacpan.org/pod/Test::More#Diagnostics for details. > > True, but that also means it shows up in the actual failure message, > which seems too verbose. By just using 'print', it ends up in the log > file if it's needed, but not anywhere else. Maybe there's a better way > to do this, but I don't think using note() is what I want.
That is the difference between note() and diag(): note() prints to stdout so is not visible under a non-verbose prove run, while diag() prints to stderr so it's always visible. - ilmari