Try the following.
Log.Warning(Str, ExtStr, Prior, Log.CreateNewAttributes(), sImgPath);
While I understand your assumptions behind leaving that attributes parameter empty, this is invalid code. That attributes object is expected to be an object type, otherwise it won't work.
Optional parameters are optional when they are omitted AND there is not a parameter in use AFTER them that is being filled in. In your case, you're using the picture parameter which comes after the attributes parameter so you need to at least send in a default attributes object. This is actually, in my experience, standard for most code languages.