Previously, an object was incorrectly passed as the log code parameter. Fixes it by ensuring that a string is passed instead.