Hi Tim,

Drill already contains logback-test.xml file in drill-common module.
Since this module is used in all other modules, there is no need to add
more logback-test.xml files.

Kind regards,
Volodymyr Vysotskyi


пт, 25 трав. 2018 о 06:05 Timothy Farkas <tfar...@mapr.com> пише:

> Thanks Paul, forgot about that. I'll migrate all the tests off of
> System.out.print and onto LogFixture, I don't think its worth it to create
> a TestLogger.out since we should all be using loggers anyway. I'll also add
> a checkstyle check that will cause the build to fail of System.out.print is
> used anywhere.
>
> Thanks,
> Tim
>
> ________________________________
> From: Paul Rogers <par0...@yahoo.com.INVALID>
> Sent: Thursday, May 24, 2018 7:08:28 PM
> To: dev@drill.apache.org
> Subject: Re: [Question] Using loggers in tests
>
> LogFixture? As illustrated in ExampleTest?
>
> This fixture lets you turn on all or selected loggers for the duration of
> a single test. I used it all the time when debugging. Works great.
> It works when turning loggers on when the default is that they are off.
> For whatever reason, I could not get it to work to turn off logging that
> was enabled in the config file.
> At one point I did look into adding a custom debug logger that works just
> like System.out, but is disabled by default. That way, conversion was just
> a matter of replacing System.out with TestLogger.out which can be done via
> search/replace. Not sure if I ever checked that in, but it would be trivial
> to replicate.
> Thanks,
> - Paul
>
>
>
>     On Thursday, May 24, 2018, 5:32:49 PM PDT, Timothy Farkas <
> tfar...@mapr.com> wrote:
>
>  Hi All,
>
> I was wondering if there was a magical way to enable the Slf4j loggers for
> unit tests without adding a logback-test.xml file into src/test/resources
> for a submodule in the project? If not, would there by any issues with
> adding a default logback-test.xml file that has logging disabled by default
> to each submodule's src/test/resources directory? I'd like to do this in
> order to discourage the use of System.out.println in tests (and eventually
> prohibit it completely) by providing an easy to use out of the box
> alternative. Currently our test logs are polluted by many System.out.print
> statements and switching to using logging will allow us to have our test
> messages when we want them, and to disable them when we don't want them.
>
> Thanks,
> Tim
>

Reply via email to