1. /run local f = CreateFrame("frame",nil, UIParent); f:SetScript("OnUpdate", CombatLogClearEntries);

    or

    /script CombatLogClearEntries();

  2. /run local f = CreateFrame("frame",nil, UIParent); f:SetScript("OnUpdate", CombatLogClearEntries);

    This is very very very very very very wrong. This will clear the combat log every single time the screen refreshes. This will severely impact the performance of your game.

    or

    /script CombatLogClearEntries();

    If this works, it would be one way to clear the combat log, certainly.