Splitting log formatting behavior from chat widget to allow easier customization later.