Custom logger and token editing