Implemented log rotation

Change-Id: I40802f5b7cff38dfacfbd3f19b3b9799b0788d4b