Class KCLogger


  • public class KCLogger
    extends Object
    Logger for Snowflake Sink Connector. Attaches MDC's connector context if available
    • Constructor Detail

      • KCLogger

        public KCLogger​(String name)
        Create and return a new logging handler
        Parameters:
        name - The class name passed for initializing the logger
    • Method Detail

      • toggleGlobalMdcLoggingContext

        public static void toggleGlobalMdcLoggingContext​(boolean shouldPrependMdcContext)
        Enable or disables the MDC context. Only available for apache kafka versions after 2.3.0. https://cwiki.apache.org/confluence/display/KAFKA/KIP-449%3A+Add+connector+contexts+to+Connect+worker+logs
        Parameters:
        shouldPrependMdcContext - If all KC loggers should enable or disable MDC context
      • info

        public void info​(String format,
                         Object... vars)
        Logs an info level message
        Parameters:
        format - The message format without variables
        vars - The variables to insert into the format. These variables will be toString()'ed
      • trace

        public void trace​(String format,
                          Object... vars)
        Logs an trace level message
        Parameters:
        format - The message format without variables
        vars - The variables to insert into the format. These variables will be toString()'ed
      • debug

        public void debug​(String format,
                          Object... vars)
        Logs an debug level message
        Parameters:
        format - The message format without variables
        vars - The variables to insert into the format. These variables will be toString()'ed
      • warn

        public void warn​(String format,
                         Object... vars)
        Logs an warn level message
        Parameters:
        format - The message format without variables
        vars - The variables to insert into the format. These variables will be toString()'ed
      • error

        public void error​(String format,
                          Object... vars)
        Logs an error level message
        Parameters:
        format - The message format without variables
        vars - The variables to insert into the format. These variables will be toString()'ed