Made logging toggle based on extension state