Set up the Log History
You can change Log History settings in the History pane of Script Editor preferences. The History pane has controls for activating and deactivating script event logs and for setting the maximum number of stored entries.
Choose Script Editor > Preferences.
Select Enable Log History to turn the event logs on or off.
To log all entries select “Unlimited entries,” or to set a limit, select “Maximum entries,” then enter the maximum number.
Select “Log only when visible” to turn off events so they are logged only when the lower pane of the Script Editor window is visible, or when the Log History window is open.