Database log messages (auto cleaning) with keeping exceptions
Under Database log messages to keep, there is an All option to keep all logs.  However, there is no option to selectively delete logs automatically in core.
There are two things you could try instead:
First, the Recent log messages screen is a view.  So, if you have the Views UI module enabled, you can edit the log messages view to create a new view mode (for example, a separate page) and then customize the configuration on that page to only list the types of log messages you want to automatically delete.  You can then trigger this manually at whatever interval you want.
Another option would be to use the Logging and Alerts module to store the logs you want to keep forever by copying them to email, SMS, or some other server.