For example, if your utility function is log (X), then you will accept the first bet
Not even that. You start with $1 (utility = 0) and can choose between
walking away with $1 (utility = 0), and
accepting a lottery with a 50% chance of leaving you with $0 (utility = −∞) and a 50% chance of having $3 (utility = log(3)).
The first bet’s expected utility is then −∞, and you walk away with the $1.
Not even that. You start with $1 (utility = 0) and can choose between
walking away with $1 (utility = 0), and
accepting a lottery with a 50% chance of leaving you with $0 (utility = −∞) and a 50% chance of having $3 (utility = log(3)).
The first bet’s expected utility is then −∞, and you walk away with the $1.