The destination of log messages should be configurable, for example a log4j.properties file


(Gerd Boerrigter) #1

We are in the process of transforming the ant and groovy files for running our integration test to gradle.

In ant we use the record target to write multiple logfiles with different log levels. One file with little information is automatically examined to point out the failed test case. A verbose file might be used by a developer to correct programming errors.

The messages written with ant.echo are written to the files, but gradle log messages are missing. Our workaround for now is to use the ant.echo task for logging, which is not really optimal.

Instead of having a task like the ant record target directly in grade, it would be a great feature, if the logging could be configured like it is possible with the log4j.properties file. So we could use different log-levels and even different logger to dispense the messages to different files. The configuration should not be in a property file, instead directly in the gradle file, so the configuration could change dynamically (e.g. the filename depends on the project).

I mentioned this idea briefly in the second comment of GRADLE-1196, but this idea is really something more than the wish in the issue.