This is an automated email from the ASF dual-hosted git repository. joemcdonnell pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push: new 850de91 IMPALA-9107: Add timestamp to maven logging options. 850de91 is described below commit 850de91cc38b681e8cb5ea6194e4ba3415ea2c4d Author: David Knupp <dkn...@cloudera.com> AuthorDate: Mon Mar 23 13:29:59 2020 -0700 IMPALA-9107: Add timestamp to maven logging options. We found that using awk to add a timestamp to the maven log can fail if gawk is not installed. It seems better to configure maven to add the timestamp itself. Sample output: ======================================================================== Running mvn -U -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss -B install -DskipTests Directory /home/dknupp/Impala/ext-data-source ======================================================================== 16:37:16 [INFO] Scanning for projects... 16:37:16 [INFO] ------------------------------------------------------------------------ 16:37:16 [INFO] Reactor Build Order: 16:37:16 [INFO] 16:37:16 [INFO] Apache Impala External Data Source [pom] 16:37:16 [INFO] Apache Impala External Data Source API [jar] 16:37:16 [INFO] Apache Impala External Data Source Sample [jar] 16:37:16 [INFO] Apache Impala External Data Source Test Library [jar] 16:37:17 [INFO] 16:37:17 [INFO] ----------------< org.apache.impala:impala-data-source >---------------- 16:37:17 [INFO] Building Apache Impala External Data Source 1.0-SNAPSHOT [1/4] 16:37:17 [INFO] --------------------------------[ pom ]--------------------------------- [etc...] Change-Id: I10fbe9eb76b66e6ba00db9f95c91063410dd1b4e Reviewed-on: http://gerrit.cloudera.org:8080/15537 Reviewed-by: Laszlo Gaal <laszlo.g...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> --- bin/mvn-quiet.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/mvn-quiet.sh b/bin/mvn-quiet.sh index d8e3711..cc673da 100755 --- a/bin/mvn-quiet.sh +++ b/bin/mvn-quiet.sh @@ -31,9 +31,11 @@ Directory $(pwd) ======================================================================== EOF +LOGGING_OPTIONS="-Dorg.slf4j.simpleLogger.showDateTime \ + -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss" + # Always use maven's batch mode (-B), as it produces output that is easier to parse. -# Also, add a timestamp to the maven output. -if ! mvn -B $IMPALA_MAVEN_OPTIONS "$@" | awk '{ print strftime("[%H:%M:%S]"), $0 }' | \ +if ! mvn -B $IMPALA_MAVEN_OPTIONS $LOGGING_OPTIONS "$@" | \ tee -a "$LOG_FILE" | grep -E -e WARNING -e ERROR -e SUCCESS -e FAILURE -e Test; then echo "mvn $IMPALA_MAVEN_OPTIONS $@ exited with code $?" exit 1