/** * Run the supplied function in the temporary connector MDC context, and when complete always return the MDC context to its * state before this method was called. * * @param contextName the name of the context; may not be null * @param operation the function to run in the new MDC context; may not be null * @throws IllegalArgumentException if any of the parameters are null */ public void temporaryLoggingContext(String contextName, Runnable operation) { LoggingContext.temporarilyForConnector("MySQL", connectorConfig.getLogicalName(), contextName, operation); }