You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bernd <ec...@zusammenkunft.net> on 2015/02/20 14:49:06 UTC

Configure Logger (timestamps in Jenkins)

Hello,

since Maven 3.1 the simple logger properties are a convinient method to
switch on (millisecond) relative time stamps in Maven.

I enjoy this on the console as it does not take much room and allows to see
potential for optimizing. This is done by switching on the timestamps (the
empty default format is printing them as relative millis):

    org.slf4j.simpleLogger.showDateTime=true

However I want this feature in Jenkins as well. There I have the problem
that when using the automatic maven deploy which downloads a selected
version from maven site and unpacks it (which is convinient to roll it out
to the slaves) then I have no hook for making the required config file
modification.

I have also tried using the above property as a system property, but it
does not seem to work. Jenkins can manage and distribute settings.xml but
it seems to have no grab on the simplelogger.properties.

Any idea how to solve that cleanly?

Gruss
Bernd

Re: Configure Logger (timestamps in Jenkins)

Posted by Baptiste Mathus <bm...@batmat.net>.
Just use a Jenkins plugin like timestamper [1], don't depend on customized
Maven binaries. The advantage of doing it at the Jenkins level is that the
whole build will be timestamped, even anything before or after the Maven
part.

[1] https://wiki.jenkins-ci.org/display/JENKINS/Timestamper

2015-02-20 14:49 GMT+01:00 Bernd <ec...@zusammenkunft.net>:

> Hello,
>
> since Maven 3.1 the simple logger properties are a convinient method to
> switch on (millisecond) relative time stamps in Maven.
>
> I enjoy this on the console as it does not take much room and allows to see
> potential for optimizing. This is done by switching on the timestamps (the
> empty default format is printing them as relative millis):
>
>     org.slf4j.simpleLogger.showDateTime=true
>
> However I want this feature in Jenkins as well. There I have the problem
> that when using the automatic maven deploy which downloads a selected
> version from maven site and unpacks it (which is convinient to roll it out
> to the slaves) then I have no hook for making the required config file
> modification.
>
> I have also tried using the above property as a system property, but it
> does not seem to work. Jenkins can manage and distribute settings.xml but
> it seems to have no grab on the simplelogger.properties.
>
> Any idea how to solve that cleanly?
>
> Gruss
> Bernd
>



-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !