I don't know MySQL but in any event, overriding Log(Error) won't help you at all. You'll want to implement BeginLog and EndLog instead and ensure that the MySQL API supports overlapped I/O. The only ErrorLog implementation in ELMAH that does this is SqlErrorLog for MS SQL Server. Even with BeginLog and EngLog implemented, the Error event in
ASP.NET is processed synchronously. The reason SqlErrorLog uses overlapped I/O is mainly for full retrieval during an entire download of a log.
ErrorMailModule supports async operation by using another thread for a number of reasons and is therefore equally flawed. But the rationale behind nonetheless offering the option was that SMTP servers can be slower to respond than databases (especially in shared hosting environment) and to let the Error event & HTTP transactions complete sooner and in parallel.