public static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName = null) { DebugValidateArg(thisOrContextObject); DebugValidateArg(formattableString); if (IsEnabled) { Log.ErrorMessage(IdOf(thisOrContextObject), memberName, Format(formattableString)); } }
public static void Error(Exception exception, [CallerMemberName] string?memberName = null) => Log.ErrorMessage(memberName ?? "(?)", exception.ToString());
public static void Error(object?thisOrContextObject, FormattableString formattableString, [CallerMemberName] string?memberName = null) => Log.ErrorMessage(IdOf(thisOrContextObject), memberName, Format(formattableString));