Use a proper function to enable serial log printing instead of setting class member variables directly.