Added on_debug

Added on_debug for localized logging.