How to enable logging of plugin execution

2008-06-09 Thread Jon Seymour
I am trying to enable log4j output in order to capture diagnostics
from the execution of a Maven plugin.

The execution environment is Maven 2.0.7, running under cygwin.

I do the following:

   export MAVEN_OPTS=-Dlog4j.configuration='c:\temp\log4j.properties'
   mvn clean install

However, I don't get any logging output from the maven build.

I searched the maven website and user archives for clues, but haven't found any.

What am I doing wrong?

jon seymour.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to enable logging of plugin execution

2008-06-09 Thread Bernhard David
Hello,

is it possible to use the plugin logging facility? You can call getLog()
in your mojo to get the plugin logger. It's not log4j (it's a plexus
logger) but it does pretty much the same.

I tried myself to get log4j and maven to work together, I'd be
interested if anyone else succeeds. 

Yours,

David Bernhard

 -Original Message-
 From: Jon Seymour [mailto:[EMAIL PROTECTED] 
 Sent: 09 June 2008 03:30
 To: users@maven.apache.org
 Subject: How to enable logging of plugin execution
 
 I am trying to enable log4j output in order to capture diagnostics
 from the execution of a Maven plugin.
 
 The execution environment is Maven 2.0.7, running under cygwin.
 
 I do the following:
 
export 
 MAVEN_OPTS=-Dlog4j.configuration='c:\temp\log4j.properties'
mvn clean install
 
 However, I don't get any logging output from the maven build.
 
 I searched the maven website and user archives for clues, but 
 haven't found any.
 
 What am I doing wrong?
 
 jon seymour.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to enable logging of plugin execution

2008-06-08 Thread Jon Seymour
Ah, debugging it revealed the issue - I needed to specify the
log4j.configuration as a URL, not a simple file name:

e.g.

-Dlog4j.configuration=file:///c:/temp/log4j.properties

jon.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]