Logging/tracing conventions

2005-09-28 Thread Gilles Scokart


When writting a Mojo, what are the standard convention to trace/log [debug] 
messages ?



Gilles Scokart

_
Protégez votre boîte de réception: Phishing : comment l'identifier, le 
signaler et l'empêcher   http://www.fr.msn.be/security/phishing/



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



Re: Logging/tracing conventions

2005-09-28 Thread Trygve Laugstøl
On Wed, 2005-09-28 at 12:24 +0200, Gilles Scokart wrote:
> When writting a Mojo, what are the standard convention to trace/log [debug] 
> messages ?

getLog().info( "Hey yo!" );

--
Trygve



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



Re: Logging/tracing conventions

2005-09-28 Thread Orjan Austvold
Instead of having lots of debug statements in your Mojo, you could 
simply connect a debugger to Maven.


I'm doing this with IDEA simply by running maven with

MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" m2 install



Ørjan


Gilles Scokart wrote:


When writting a Mojo, what are the standard convention to trace/log 
[debug] messages ?



Gilles Scokart

_
Protégez votre boîte de réception: Phishing : comment l'identifier, le 
signaler et l'empêcher   http://www.fr.msn.be/security/phishing/



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



--
Ørjan Austvold - Senior Software Architect
www.colibria.com - putting the presence into messaging

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



Re: Logging/tracing conventions

2005-09-28 Thread Gilles Scokart
Thanks, but what are the guidelines on when to log at which level ?  I guess 
it's a good idea that all plugins follow the same guidelines.  What is the 
best practice for that ?


And what if our mojo call external code that is not (and should not be) 
aware of running into a maven plugin ?



> When writting a Mojo, what are the standard convention to trace/log 
[debug]

> messages ?

getLog().info( "Hey yo!" );

--
Trygve


_
Protégez votre boîte de réception: Phishing : comment l'identifier, le 
signaler et l'empêcher   http://www.fr.msn.be/security/phishing/



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



Re: Logging/tracing conventions

2005-09-28 Thread Brett Porter
On 9/29/05, Gilles Scokart <[EMAIL PROTECTED]> wrote:
> Thanks, but what are the guidelines on when to log at which level ?  I guess
> it's a good idea that all plugins follow the same guidelines.  What is the
> best practice for that ?

This should all be information for the user: ERROR for things that
went wrong (generally this will result in a failure/exception
instead), WARN for things that need attention but not a problem, and
INFO for general progress (this won't be displayed if we have a quiet
mode).

DEBUG for verbose information to help them diagnose a problem.

>
> And what if our mojo call external code that is not (and should not be)
> aware of running into a maven plugin ?

In theory it is possible to configure log4j and commons-logging from
the plexus container that Maven runs in. That is probably what would
need to happen but I'd have to look at a specific case to see how this
plays out.

- Brett

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



Re: Logging/tracing conventions

2005-10-25 Thread Jamie Bisotti
On 9/28/05, Orjan Austvold <[EMAIL PROTECTED]> wrote:
>
> Instead of having lots of debug statements in your Mojo, you could
> simply connect a debugger to Maven.
>
> I'm doing this with IDEA simply by running maven with
>
> MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE
> -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" m2 install
>
>
> Ørjan
>
>
> Gilles Scokart wrote:
> >
> > When writting a Mojo, what are the standard convention to trace/log
> > [debug] messages ?
> >
> >
> > Gilles Scokart
> >
> > _
> > Protégez votre boîte de réception: Phishing : comment l'identifier, le
> > signaler et l'empêcher http://www.fr.msn.be/security/phishing/
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> --
> Ørjan Austvold - Senior Software Architect
> www.colibria.com  - putting the presence into
> messaging
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Using a debugger in place of log statements if a bad idea!

--
Jamie Bisotti