The Azure AD Connect Log is saved into an SQL database. It is a good idea to keep this database small to get the best performance and to prevent the Azure AD Connect Log 10GB limit.
Microsoft published a great documentation how to recover from LocalDB 10-GB limit.
Here is my approach to keep the Logs clean (as many know, I hate the GUIs):
You will find the complete function on GIST.
As an addition, I set the days to keep in the history to three (3) days:
You can check your settings with the following command:
The Script should work with DirSync, Azure AD Sync, and Azure AD Connect.