Convert prints to logger