Clear log please - thank you

when I clear the logs (click the clear button) it clears just fine but then comes back with all the previous messages. Is there some way to permanently clear the log. I would also like to programmatically clear the log.

They are working on this bug, but this one seems to be hard

can i clear the server log using code? and not my mouse?