Fix up loggingsource and back down on logging for uknown prepared statements.