How to enable Preserve Log on Browser Console while executing an automation script?

Currently, Chrome Browser does not enable Preserve Log option by default when executing a script!
Is there a way to enable the Preserve Log option beforehand?