I would probably lean towards using System.out.println in a non-end-to-end
test and using Logger in an end-to-end test that's already using our
logging system. My only argument against using System.out.println in an
end-to-end test is that it can easily get lost or incorrectly interleaved
in the
In general I agree.
I’m an author of the PR that triggered this thread. That PR specifically prints
new information to help diagnose an intermittent CI failure in a
DistributedTest test, which we have been unable to reproduce outside of CI. Our
working hypothesis is that an action initiated at
Exactly what Kirk said!
> On Sep 21, 2018, at 10:34 AM, Kirk Lund wrote:
>
> Most of these logWriter or logger usages are in larger end-to-end tests
> that were written before we could using IDE debuggers on our tests. With a
> debugger, I don't want to see more output from the test so I tend
Most of these logWriter or logger usages are in larger end-to-end tests
that were written before we could using IDE debuggers on our tests. With a
debugger, I don't want to see more output from the test so I tend to delete
all such System.out.printlns or LogWriter/Logger usage.
My recommendation
For simple single threaded tests System.out would do the job.
For a multi-threaded test I have found the logging framework to be helpful
because of the thread id and the timestamps.
On Thu, Sep 20, 2018 at 1:50 PM Dale Emery wrote:
> As long as the stdout is available in the test results, I’m
As long as the stdout is available in the test results, I’m more than happy to
avoid coupling the tests to the product logging code.
> On Sep 20, 2018, at 1:39 PM, Galen O'Sullivan wrote:
>
> I was reviewing a PR recently and noticed that we have some test code that
> uses Logger (or
I was reviewing a PR recently and noticed that we have some test code that
uses Logger (or LogWriter). If I understand correctly, anything logged to
stdout will be included in the test output, and anything logged in a DUnit
VM will be logged with the appropriate VM number prepended in the output.