How can I clear the data in the logger?

You clear the logger by configuring a new logging session.

In other words, you don’t need to clear the logger. Each time when you start a new session the data will be cleared.