public void Exception(Exception ex, string format, params object[] args) { if (IsEnabled()) { var message = Utils.TraceExceptionMessage(ex, format, args).ToString(); if (ex is ServiceResultException sre) { ServiceResultException((int)sre.StatusCode, message); } else { Exception(message); } } else { Utils.LogError(ex, format, args); } }