Add optinal object logging to logDebug