How to disable Clear Log by code

Hi there!

I see this options in Console > Clear > 3 options for clear log on play or on build

so I would like to know, there is possible to disable them all by code?

because I’m trying to build OnPreprocessBuild and I have to disable all options to see the Debug.Log,
if don’t disable them, I can’t see any Debug.Log messages in the console,
this Debug.Log maybe under build processing, so it has been clear.

any suggestion?
Thanks!!!

Not easily as the relevant class is internal: UnityCsReference/Editor/Mono/ConsoleWindow.cs at master · Unity-Technologies/UnityCsReference · GitHub

Would have to use reflection to make this possible.