Logging in unit tests?

17 views
Skip to first unread message

Chris Cleveland

unread,
Jan 21, 2020, 1:50:49 PM1/21/20
to dropwizard-user
I've got some unit tests that do not invoke Dropwizard. They test isolated classes.

I'd like to configure logging to write to disk instead of the console.

I tried this, but it isn't clear where the log file gets written, if anywhere.

    public static void main(String[] args) {
        BootstrapLogging.bootstrap();
        Logger logger = LoggerFactory.getLogger(TestLogging.class);
        logger.info("hello");
    }

How do I configure BootstrapLogging without running my Dropwizard application?


Reply all
Reply to author
Forward
0 new messages