Create an api function for the 'clear logging' cli command and update the test framework to use the new api function.