An interesting subject, apparently, in mysql there is no such thing, but the guy recommends using (for your logs table) the myisam table, since these are external transactions, the data is still published.
I am adding a second answer, as I just figured out this alternative: what you can do is process the log transaction from another connection with another user in your database.
Mysql processes the connection pool for each user, so it will never use the same connection for basic operations and log operations, which allows you to record the connection of logs independently.
Sebas source share