More lenient db detection in Logger abstract factory

The fix for #5254 was too strict in that it checked for a very specific writer _name_, when it should only be checking the "db" options key. This PR modifies the behavior of the logger abstract factory to do that.