Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] How to disable jgit debug messages when using it via ant

Dear jgit developers!

I'm using jgit to automatically create some git manifest attributes within my project via the following ant task

    <target name="jgit-buildnumber" depends="retrieve">
<taskdef name="extract-buildnumber" classname="com.labun.buildnumber.JGitBuildNumberAntTask" classpathref="dependencies" /> <extract-buildnumber verbose="false" buildNumberFormat="branch + '.' + commitsCount + '/' + commitDate + '/' + shortRevision + (dirty.length > 0 ? '-' + dirty : '')"/>
    </target>

This is working without any error. But I'm getting a LOT of these messages:

[extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, create new FileSnapshot: lastRead=2020-06-05 01:38:09.759000000, lastModified=2020-06-05 01:38:09.759024000, size=1, fileKey=java.lang.Object@4a891c97 [extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, isRacyClean=true, read=2020-06-05 01:38:09.759000000, lastModified=2020-06-05 01:38:09.759024000, delta=-24000 ns, racy<=40002500 ns [extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, is racily clean [extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, create new FileSnapshot: lastRead=2020-06-05 01:38:09.759000000, lastModified=2020-06-05 01:38:09.759024000, size=1, fileKey=java.lang.Object@4a891c97 [extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, isRacyClean=true, read=2020-06-05 01:38:09.759000000, lastModified=2020-06-05 01:38:09.759024000, delta=-24000 ns, racy<=40002500 ns [extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, is racily clean [extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, create new FileSnapshot: lastRead=2020-06-05 01:38:09.759000000, lastModified=2020-06-05 01:38:09.759024000, size=1, fileKey=java.lang.Object@4a891c97 [extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, isRacyClean=true, read=2020-06-05 01:38:09.759000000, lastModified=2020-06-05 01:38:09.759024000, delta=-24000 ns, racy<=40002500 ns [extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, is racily clean [extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, create new FileSnapshot: lastRead=2020-06-05 01:38:09.759000000, lastModified=2020-06-05 01:38:09.759024000, size=1, fileKey=java.lang.Object@4a891c97 [extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, isRacyClean=true, read=2020-06-05 01:38:09.759000000, lastModified=2020-06-05 01:38:09.759024000, delta=-24000 ns, racy<=40002500 ns [extract-buildnumber] 01:38:09.759 [ForkJoinPool.commonPool-worker-1] DEBUG org.eclipse.jgit.internal.storage.file.FileSnapshot - file=D:\JenkinsWork\tools_pipeline_branch\workspace\.git\.probe-5fc62af0-343e-44c9-95fd-e9d8201526ce, is racily clean

Running this ant task from within eclipse produces 70KB of log messages for one small git project. Calling ant via commandline (Jenkins) produces ~4MB of log messages.

How can I disable these messages? Is class "com.labun.buildnumber.JGitBuildNumberAntTask" responsible for that? Currently I don't know where to start looking for it, as I searched for and tried nearly everything. Looking at the sourcecode at
https://github.com/eclipse/jgit/blob/18050b569f9836e67df43ef66e78ace6ca9815d1/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java#L238
it seems that LOG is set to DEBUG mode everytime.

Thank you for your help and sorry in case this is not the right mailing list for my question!


Best regards,
Sven


Back to the top