Re: How to set log level when testing a custom mojo?

2010-08-31 Thread Wayne Fay
> I know that I can set the log level to DEBUG mode with the -X option, but
> then I get thousands of lines of useless output. Is there a way I can limit
> the output to only my class? Something like -Dlog.level.com.mycompany=DEBUG

Logging in custom mojos in Maven is a bit difficult in my experience.
No such "debug for my class only" option exists that I'm aware of. I
end up just using -X and then piping it to grep.

> I've also attempted using log4j but it seems there's no easy way to make
> log4j realize where the lo4j.properties file is, when testing a custom mojo.

You could just do a log4j initializer in the code directly, rather
than using a log4j.properties file. And maybe use a plugin parameter
in the pom to kick it off or not?

Wayne

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



How to set log level when testing a custom mojo?

2010-08-31 Thread Gajo Csaba
I know that I can set the log level to DEBUG mode with the -X option, 
but then I get thousands of lines of useless output. Is there a way I 
can limit the output to only my class? Something like 
-Dlog.level.com.mycompany=DEBUG ?


I've also attempted using log4j but it seems there's no easy way to make 
log4j realize where the lo4j.properties file is, when testing a custom 
mojo.


Anyway, what is the best way to do this?

Thanks, Csaba



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