Yes, thread-id will help to some degree, but maven uses multiline log
messages quite often and these will still be mangled and unreadable.
Per-project build log files is the only solution I found to preserve
readable logs. Also, each project build is mostly independent from the
rest and I find reading self-contain per-project log files much easier.

-- 
Regards,
Igor

On Mon, May 25, 2015, at 10:21 AM, Sean Busbey wrote:
> In multithreaded builds we could add a thread ID to each output line.
> That
> would make it easier to read and filter in different files in post
> processing.
> 
> -- 
> Sean
> On May 25, 2015 6:30 AM, "Igor Fedorenko" <i...@ifedorenko.com> wrote:
> 
> > I had to troubleshoot a large multithreaded build last week and that
> > proved to be rather difficult mostly because build log was a jumble of
> > messages produced by concurrently running threads. It was not possible
> > to tell which message came from which thread, which made the build log
> > more or less useless.
> >
> > What I ended up doing was to write per-module log message to individual
> > ${project.build.directory}/build.log log files.
> >
> > That was kinda tricky to implement because log files were opened very
> > early during module build and were subsequently deleted by
> > maven-clean-plugin (I tried on Linux and OSX, and I assume the build
> > will fail on Windows). I had to modify maven-clean-plugin configuration
> > in the project pom.xml to retain ${project.build.directory}/build.log
> > files.
> >
> > I felt my solution required too my effort and I wonder what others do to
> > capture logs during multithreaded builds. Can we come up with a
> > "recommended" way of doing this?
> >
> > --
> > Regards,
> > Igor
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > For additional commands, e-mail: dev-h...@maven.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to