Some time the need arises to have our with different name. By default, if no other configuration is given, log4j will search your classpath for a '' file.

Now to use your own named log4j property add the following line in your main program:

  PropertyConfigurator.configure("File  name with path")


 PropertyConfigurator.configure("c:\\logs\\")   this will set this as a default property name and all done =)