Sensex Logs Gains In Volatile Session