Hi Eric

Almost. I want to log the screen output from my most important goals to a file, and also have the output on screen. Shell redirection is not enough.

Thanks a lot.

Heiko

Eric Giguere wrote:

Hi there
I'm not sure if I miss the point but from what I understand, yes, you can now log at a goal level.


I guess you may check this : http://jakarta.apache.org/commons/jelly/libs/log/index.html
There is a nice log taglib for jelly that acts as the well known log4j api. This tag lib uses in fact the commons-logging.


You just have to insert this :
xmlns:log="jelly:log" in the project tag of you maven.xml file. Then, you can use the jelly log taglib tags like this :
<log:info> bla bla </log:info> or <log:debug>bla bla</log:debug>
All log tags also allow to specify which logger instance you want to use or logger name using the tags build-in properties.


And these log tags are not reserved to plugins only... maven.xml can contain jelly scripting to.
With proper configuration (still have to do that), you will be able like in java app to set the log level and since you can specifiy the logger instance, you could even filter logging as you want, like we do with commons-logging (or log4j).


Hope it helps
Eric.

Eric Hauser wrote:

If you are interested in Ant logging, I submitted a patch
http://jira.codehaus.org/secure/ViewIssue.jspa?key=MAVEN-126 called MAVEN126.patch that gives you the ability to get Ant logging when using Ant tasks. It is a quick hack to add this functionality, but at least should serve as a good example for how to add it yourself.


As far as configuring logging for Maven itself, I do not believe what you are trying to do is possible. If you are working on your own tasks, you can use a property for a logging level and handle it accordingly in your Jelly. Currently, Maven does not have a very flexible logging system in the core, but I believe this is planned for the future.

Heiko Kundlacz wrote:

Hi,

in Ant there is a output flag on the task level. Is there any according functionality for maven?

Can I log output on a goal level?

Thanks for your help

Heiko



---------------------------------------------------------------------
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]






--
------------------------------------------------------
Heiko Kundlacz   | MailTo:   [EMAIL PROTECTED]
Qnamic AG        | Tel:      +41 62 209 7056
Fabrikstr. 10    | Natel:    +41 78 861 4006
4614 Haegendorf  | Fax:      +41 62 209 7044
Switzerland      | Homepage: http://www.qnamic.com
------------------------------------------------------



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



Reply via email to