Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1 

2import logging 

3from sdc_etl_libs.sdc_data_exchange_loggers.SDCSnowflakeLogger.SDCSnowflakeLogger import SDCSnowflakeLogger 

4 

5 

6class SDCLoggerFactory: 

7 

8 @staticmethod 

9 def get_logger(logging_info_): 

10 """ 

11 Generates are a logger object from the sink/source endpoint schema data passed in. 

12 :param logging_info_: Dict. Logger section of a endpoint data schema. 

13 :return: Logger object. 

14 """ 

15 

16 logger_type = logging_info_["type"] 

17 

18 if logger_type.lower() == "snowflake": 

19 

20 return SDCSnowflakeLogger(logging_info_) 

21 

22 else: 

23 logging.exception(f"{logger_type} is not a valid logger option.")