Why you need "switch" here? And why are different types of logs?