You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by da...@ascentialsoftware.com on 2004/07/06 20:13:11 UTC
Using log4j to capture maven output?
Hi everyone,
I've been charged with the task of migrating a project's build system from
an ad-hoc collection of ant tasks to an automated maven-based system. The
one thing I can't seem to figure out is how to log maven's output using
log4j.
I know I can just redirect output in a shell script / batch file, but I'm
trying to keep the build scripts as OS independent as I can so it would be
ideal if I could configure logging from within maven.xml or even
project.properties.
Is it possible to do this? According to the FAQ, maven used to log output to
maven.log but I don't see a way to enable this.
Please help!
Thanks,
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Using log4j to capture maven output?
Posted by Brett Porter <br...@gmail.com>.
doing it programmatically would mean developing a plugin that had a
jellybean that called out to the logger methods.
An easier way is probably just to add -Dlog4j.configuration=xxx to
MAVEN_OPTS or the startup script. The log4j documentation details how
to override the config, and the default maven log4j.properties are in
CVS at src/conf/log4j.properties for reference.
Cheers,
Brett
On Tue, 6 Jul 2004 14:13:11 -0400 , david.loose@ascentialsoftware.com
<da...@ascentialsoftware.com> wrote:
> Hi everyone,
>
> I've been charged with the task of migrating a project's build system from
> an ad-hoc collection of ant tasks to an automated maven-based system. The
> one thing I can't seem to figure out is how to log maven's output using
> log4j.
>
> I know I can just redirect output in a shell script / batch file, but I'm
> trying to keep the build scripts as OS independent as I can so it would be
> ideal if I could configure logging from within maven.xml or even
> project.properties.
>
> Is it possible to do this? According to the FAQ, maven used to log output to
> maven.log but I don't see a way to enable this.
>
> Please help!
>
> Thanks,
>
> Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org