How to write custom log's using Log4J in Gradle

Hi,

I am pretty new to gradle I have a Java project in which I am using gradle to build the jar file. I need to write custom logs. In documentation I found that Gradle support log4j, it would be very helpful if any one could get me a working sample of writing the logs.