Added javadoc  for log function