Index: /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/AZFailoverPoller.py
===================================================================
--- /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/AZFailoverPoller.py	(revision 38789)
+++ /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/AZFailoverPoller.py	(working copy)
@@ -62,6 +62,7 @@
 
 
     def kill_poller(self, process_name):
+        '''Using psutil to kill the process by its name.'''
         for proc in psutil.process_iter(['pid', 'cmdline']):
             if process_name in proc.info['cmdline']:
                 proc.kill()
@@ -84,11 +85,21 @@
                 time.sleep(interval)
         except KeyboardInterrupt:
             ProxyAZLogger.error("\nProcess interrupted. Exiting...")
+    def is_poller_running(self)->bool:
+        '''This method is used to determine if the poller is running or not.
+        return True if it is running
+        return False if it isn't running
+        '''
+        module_name = os.path.basename(__file__)
+        for proc in psutil.process_iter(['pid', 'cmdline']):
+            if module_name in proc.info['cmdline']:
+                return True
+        return False
 if __name__=='__main__':
-    parser = argparse.ArgumentParser(description='Process optional name argument.')
-    parser.add_argument('-mode', type=str, help='Enter 1 or 2: mode 1: start polling; mode 2: stop polling')
+    parser = argparse.ArgumentParser(description='''This API is used to start polling, stop polling, and check the status of poller for IPs transfering''')
+    parser.add_argument('-mode', type=str, choices=["1", "2", "3"], help='Enter 1 or 2: mode 1: start polling; mode 2: stop polling; mode3: check poller status')
     args = parser.parse_args()
-    az_polloer = AZFailoverPoller()
+    az_poller = AZFailoverPoller()
     config_dir = '/ca/conf/'
     ip_config_setting_file_name = 'ip_config_setting.json'
     setting_file_location = os.path.join(config_dir, ip_config_setting_file_name)
@@ -96,10 +107,25 @@
     ip_config_setting_json = ip_config_manager.get_ip_config()
 
     if args.mode=='1':
-        ProxyAZLogger.info("start polling mode")    
-        az_polloer.start(ip_config_setting_json)
+        if az_poller.is_poller_running():
+            ProxyAZLogger.info("start polling mode")    
+            az_poller.start(ip_config_setting_json)
+        else:
+            ProxyAZLogger.info("try to start polling mode, but poller has been running")
+            
     elif  args.mode=='2':
-        ProxyAZLogger.info("stop polling mode")
-        az_polloer.stop()
+        if not az_poller.is_poller_running():
+            ProxyAZLogger.info("stop polling mode")
+            az_poller.stop()
+        else:
+            ProxyAZLogger.info("try to stop polling mode, but the poller isn't running")    
+    elif args.mode=="3":
+        status = az_poller.is_poller_running()
+        if status:
+            ProxyAZLogger.info(f"check {os.path.basename(__file__)} status: running")
+        else:
+            ProxyAZLogger.info(f"check {os.path.basename(__file__)} status: not running")
+       
+        
     else:
         ProxyAZLogger.error(f"Error: mode must arugment must be 1 or 2. mode:[{args.mode}]")
\ No newline at end of file
Index: /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/LoggerManager.py
===================================================================
--- /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/LoggerManager.py	(revision 0)
+++ /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/LoggerManager.py	(working copy)
@@ -0,0 +1,59 @@
+import argparse
+from logger.ProxyAZLogger import ProxyAZLogger
+class LoggerManager():
+    def __init__():
+        pass
+    @classmethod
+    def turn_on_logger(cls)->None:
+        ProxyAZLogger.debug("Turn on log functionality.")
+        ProxyAZLogger.turn_on()
+        
+    @classmethod
+    def turn_off_logger(cls)->None:
+        ProxyAZLogger.debug("Turn off log functionality.")
+        ProxyAZLogger.turn_off()
+        
+    @classmethod
+    def check_Logger_state(cls)->bool:
+        return ProxyAZLogger.get_Logger_state()
+    @classmethod
+    def check_Logger_level_state(cls)->str:
+        return ProxyAZLogger.get_Logger_level_state()
+    @classmethod
+    def get_log(cls, number_of_line:int=None)->str:
+        res = ProxyAZLogger.get_log()
+        return res
+    @classmethod
+    def set_logger_level(cls, level:str)->None:
+        ProxyAZLogger.set_level(level)
+        
+if __name__=='__main__':
+    description = '''This API is used to 
+    1. manipulate the mode(on or off) of the functionality.
+    2. dump the log message.
+    3. check current logger status
+    3. set the log severity and show log severity'''
+    parser = argparse.ArgumentParser(description=description)
+    parser.add_argument('-mode', type=str, choices=["on", "off", "show", "status"], help='Enter [on], [off], and [show]')
+    parser.add_argument('-level', type=str, choices=["debug", "info", "warning", "error", "status"], help='choose severity amond [debug], [info], [warning], or [error]')
+    args = parser.parse_args()
+
+    # set severity
+    if args.level in ["debug", "info", "warning", "error"]:
+        LoggerManager.set_logger_level(args.level)
+    elif args.level in ["status"]:
+        print(LoggerManager.check_Logger_level_state())
+    
+    # set mode
+    if args.mode=="on":
+        LoggerManager.turn_on_logger()
+    elif args.mode=="off":
+        LoggerManager.turn_off_logger()
+    elif args.mode=="show":
+        log = LoggerManager.get_log()
+        print(log)
+    elif args.mode=="status":
+        print(LoggerManager.check_Logger_state())
+
+
+    
Index: /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/UDRPoller.py
===================================================================
--- /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/UDRPoller.py	(revision 38789)
+++ /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/UDRPoller.py	(working copy)
@@ -91,9 +91,21 @@
                     print('kill ', process_name)
                     return
             print(f"Didn't stop poller. Cannnot found module name:{process_name}. Please check current module name.", )
+
+    def is_poller_running(self)->bool:
+        '''This method is used to determine if the poller is running or not.
+        return True if it is running
+        return False if it isn't running
+        '''
+        module_name = os.path.basename(__file__)
+        for proc in psutil.process_iter(['pid', 'cmdline']):
+            if module_name in proc.info['cmdline']:
+                return True
+        return False
+        
 if __name__=='__main__':
-    parser = argparse.ArgumentParser(description='Process optional name argument.')
-    parser.add_argument('-mode', type=str, help='Enter 1 or 2: mode 1 is for starting pooling; mode 2 is for stopping pooling')
+    parser = argparse.ArgumentParser(description='''This API is used to start polling, stop polling, and check the status of poller for UDR transfering''')
+    parser.add_argument('-mode', type=str, choices=['1', '2', '3'], help='Enter 1 or 2: mode 1 is for starting polling; mode 2 is for stopping polling; mode 3 is for checking poller status')
     args = parser.parse_args()
 
     config_dir = '/ca/conf/'
@@ -102,12 +114,26 @@
     route_config_manager = RouteConfigManager(setting_file_location)
     rout_table_config_setting_json = route_config_manager.get_UDR_config()
 
-    udr_pooler = UDRPoller(rout_table_config_setting_json)
+    udr_poller = UDRPoller(rout_table_config_setting_json)
     if args.mode=='1':
-        ProxyAZLogger.info("starting pooling mode")
-        udr_pooler.start()
-        pass
-    elif  args.mode=='2':
-        ProxyAZLogger.info("stopping pooling mode")
-        udr_pooler.stop()
-        pass
\ No newline at end of file
+        if not udr_poller.is_poller_running():
+            ProxyAZLogger.info("starting polling mode")
+            udr_poller.start()
+        else:
+            ProxyAZLogger.info("try to start polling mode, but poller has been running")
+
+    elif args.mode=='2':
+        if udr_poller.is_poller_running():
+            ProxyAZLogger.info("stopping polling mode")
+            udr_poller.stop()
+        else:
+            ProxyAZLogger.info("try to stop polling mode, but the poller isn't running")       
+            
+    elif args.mode=="3":
+        status = udr_poller.is_poller_running()
+        print(status)
+        if status:
+            ProxyAZLogger.info(f"check {os.path.basename(__file__)} status: running")
+        else:
+            ProxyAZLogger.info(f"check {os.path.basename(__file__)} status: not running")
+            
\ No newline at end of file
Index: /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/logger/AZLogger.py
===================================================================
--- /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/logger/AZLogger.py	(revision 38789)
+++ /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/logger/AZLogger.py	(working copy)
@@ -120,7 +120,7 @@
             print(f"Error: The file {config_file} is not a valid JSON file.")
         
         log_path = config["log_path"]
-        log_path = "./azure_ha.log" # for developing purpose
+        # log_path = "./azure_ha.log" # for developing purpose
         log_format = config["log_format"]
         max_size_log_file = config["max_size_log_file"] #MB
 
Index: /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/logger/ProxyAZLogger.py
===================================================================
--- /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/logger/ProxyAZLogger.py	(revision 38789)
+++ /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/logger/ProxyAZLogger.py	(working copy)
@@ -10,6 +10,9 @@
     if configuration file is chaged or not in order to keep the AZLogger class pure.
     '''
     config_modified_indicator_file = os.path.join(AZLogger.current_module_directory, 'config_modified.txt')
+    with open(AZLogger.config_file_path, 'r') as config_file:
+        config = json.load(config_file)
+    is_logger_on = config["is_logger_on"]
     @classmethod
     def get_config(cls)->dict:
         '''THe usage of this method refers to the set_config()'''
@@ -40,8 +43,6 @@
             json.dump(ori_config, json_file, indent=4)
         with open(cls.config_modified_indicator_file, 'w') as file:
             pass
-            # file.write("This is a sample text indicating the config file has been modified.")
-    
     @classmethod
     def is_config_modified(cls)->bool:
         '''This method is used to check if the configuration file is modified or not.
@@ -54,28 +55,83 @@
         '''If the config file indictor file is existed, then reload the configuration file and delete indictor file.'''
         if cls.is_config_modified():
             AZLogger.reload_config()
+            with open(AZLogger.config_file_path, 'r') as config_file:
+                config = json.load(config_file)
+            cls.is_logger_on = config["is_logger_on"]
             # delete config file changed indicator
             os.remove(cls.config_modified_indicator_file)
     @classmethod
+    def set_level(cls, level:str)->None:
+        config = cls.get_config()
+        config["level_of_severity"] = level
+        cls.set_config(config)
+    @classmethod
+    def turn_on(cls)->None:
+        '''This on off functionality is on off all the invoking debug, info, warning, and error method using ProxyAZLogger class.
+        That is, if the client directly use AZLogger, the message is still be logger. However, it's not recommanded'''
+        config = cls.get_config()
+        config["is_logger_on"] = True
+        cls.set_config(config)
+        cls._refresh_config()
+        # cls.is_logger_on = True
+    @classmethod
+    def turn_off(cls)->None:
+        '''This on off functionality is on off all the invoking debug, info, warning, and error method using ProxyAZLogger class.
+        That is, if the client directly use AZLogger, the message is still be logger. However, it's not recommanded'''
+        config = cls.get_config()
+        config["is_logger_on"] = False
+        cls.set_config(config)
+        cls._refresh_config()
+        # cls.is_logger_on = False
+    @classmethod
+    def get_log(cls)->str:
+        '''return a string of content of log file'''
+        config = cls.get_config()
+        with open(config["log_path"], 'r', encoding='utf-8') as file:
+            content = file.read()
+        return content
+    @classmethod
+    def get_Logger_state(cls)->bool:
+        '''This is used to check if logger is on or not
+        return True if logger is on
+        return False if logger is off
+        '''
+        config = cls.get_config()
+        return config["is_logger_on"]
+    @classmethod
+    def get_Logger_level_state(cls)->str:
+        '''This is used to check if logger level is debug, info, warning, and error
+        return a string of log severity
+        '''
+        config = cls.get_config()
+        return config["level_of_severity"]
+    
+    @classmethod
     def debug(cls, message:str)->None:
         cls._refresh_config()
-        AZLogger.debug(message)
+        if cls.is_logger_on:
+            AZLogger.debug(message)
     @classmethod
     def info(cls, message:str)->None:
         cls._refresh_config()
-        AZLogger.info(message)
+        if cls.is_logger_on:
+            AZLogger.info(message)
     @classmethod
     def warning(cls, message:str)->None:
         cls._refresh_config()
-        AZLogger.warning(message)
+        if cls.is_logger_on:
+            AZLogger.warning(message)
     @classmethod
     def error(cls, message:str)->None:
         cls._refresh_config()
-        AZLogger.error(message)
+        if cls.is_logger_on:
+            AZLogger.error(message)
         
         
 if __name__=="__main__":
     # test code
+    
+    
     import os
     # Get the location of the current module
     current_module_directory = os.path.dirname(os.path.abspath(__file__))
@@ -96,7 +152,5 @@
             cur_config = ProxyAZLogger.get_config()
             cur_config["level_of_severity"] = "info" if cur_config["level_of_severity"]=="debug" else "debug"
             ProxyAZLogger.set_config(cur_config)
-            print("change")
-        if i ==10:
-            break
-        time.sleep(1)
\ No newline at end of file
+            print("change level")
+        time.sleep(2)
\ No newline at end of file
Index: /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/logger/config.json
===================================================================
--- /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/logger/config.json	(revision 38789)
+++ /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/logger/config.json	(working copy)
@@ -3,5 +3,6 @@
     "log_format": "[%(asctime)s] - [%(levelname)s] %(message)s",
     "max_size_log_file": 0,
     "level_of_severity": "info",
-    "datefmt": "%Y-%m-%dT%H:%M:%S"
+    "datefmt": "%Y-%m-%dT%H:%M:%S",
+    "is_logger_on": true
 }
\ No newline at end of file
Index: /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/p/p1.py
===================================================================
--- /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/p/p1.py	(revision 38789)
+++ /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/p/p1.py	(working copy)
@@ -1,6 +0,0 @@
-
-
-class p1():
-    def __init__(self) -> None:
-        print("p1 contructor")
-
Index: /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/p/p2.py
===================================================================
--- /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/p/p2.py	(revision 38789)
+++ /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/p/p2.py	(working copy)
@@ -1,7 +0,0 @@
-from p.p1 import p1
-class p2():
-    def __init__(self) -> None:
-        pass
-
-if __name__=="__main__":
-    p1()
\ No newline at end of file
Index: /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/textOuput.py
===================================================================
--- /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/textOuput.py	(revision 38789)
+++ /branches/rel_apv_10_7_0_21_pre_sight/usr/click/tools/azure/textOuput.py	(working copy)
@@ -1,8 +0,0 @@
-import os
-from utils.OutputController import OutputController
-print("first")
-output_controller = OutputController()
-output_controller.start_to_file()
-print("start to file")
-output_controller.end_to_file()
-print("end to file")
\ No newline at end of file
