Index: /branches/rel_apv_10_7_2_13_pre_sight/usr/click/bin/backend/sys_cmd.c
===================================================================
--- /branches/rel_apv_10_7_2_13_pre_sight/usr/click/bin/backend/sys_cmd.c	(revision 38979)
+++ /branches/rel_apv_10_7_2_13_pre_sight/usr/click/bin/backend/sys_cmd.c	(working copy)
@@ -3024,93 +3024,98 @@
 }
 
 // AZURE CLOUD FUNCTION START
-void 
-cloud_az_ha_enable() 
+void
+cloud_az_ha_enable()
 {
 	cloud_az_ha_disable();
-
 	FILE *fp;
-	char path[1035];
 	char cmd[1024];
+	char path[1035];
+    int status;
 
-	fp = popen("python3 /ca/bin/azure/SystemRun.py 0 /tmp/az_account az account show", "r");
-	if (fp == NULL) {
-		printf("Fail\n");
-		exit(1);
-	} else {
-		pclose(fp);
-	}
-
-	fp = fopen("/tmp/az_account_0", "r");
-	if (fp == NULL) {
-		printf("Fail\n");
-		return;
-	} else {
-		fclose(fp);
-	}
-
-	// run in background
-	snprintf(cmd, 1024, "python3 /ca/bin/azure/AZFailoverPoller.py -mode 1 &");
-	system(cmd);
+    // Format the command string
+    snprintf(cmd, 1024, "python3 /ca/bin/azure/AZFailoverPoller.py -mode 1 &");
 
+    status = system(cmd);
 	sleep(2);
-	// ret = system("ps aux | grep -v grep | grep -q \"python3 /ca/bin/azure/AZFailoverPoller.py -mode 1\"");
-	// if (ret == -1) {
-	// 	printf("Fail\n");
-	// 	return;
-	// }
-
-	// if (WIFEXITED(ret)) {
-	// 	if (WEXITSTATUS(ret) != 0) {
-	// 		printf("Fail\n");
-	// 	} else {
-	// 		printf("Success\n");
-	// 	}
-	// } else {
-	// 	printf("Fail\n");
-	// }
-
-	fp = popen("python3 /ca/bin/azure/SystemRun.py 1 /tmp/az_ha ps aux '|' grep -v grep '|' grep -q 'python3 /ca/bin/azure/AZFailoverPoller.py -mode 1'", "r");
-	if (fp == NULL) {
-		printf("Fail\n");
-		exit(1);
-	} else {
-		pclose(fp);
-	}
-
-	fp = fopen("/tmp/az_ha_0", "r");
-	if (fp == NULL) {
-		printf("Fail\n");
-		return;
-	} else {
-		fclose(fp);
-	}
-	printf("Success\n");
-
-
-//
-	// fp = popen("python3 /ca/bin/azure/AZFailoverPoller.py -mode 1", "r");
-	// if (fp == NULL) {
-    //     printf("Failed to run command\n" );
-    //     exit(1);
-    // }
-    // while (fgets(path, sizeof(path)-1, fp) != NULL) {
-    //     printf("%s", path);
-    // }
-    // pclose(fp);
-//
+    // Check if the command executed successfully
+    if (status == -1) {
+        // system() failed to start the command
+        printf("Failed to execute \"cloud az ha enable\"\n");
+
+    } else {
+        // Check if the command returned a non-zero status (failure)
+        if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
+		    // Format the command string
+            snprintf(cmd, 1024, "python3 /ca/bin/azure/AZFailoverPoller.py -mode 3");
+            // Run the command and capture the return status
+            fp = popen(cmd, "r");
+            if (fp == NULL) {
+                printf("Failed to execute \"cloud az ha enable\"\n");
+            }
+            while (fgets(path, sizeof(path)-1, fp) != NULL) {
+                path[strcspn(path, "\n")] = 0;
+                // Check if the output is "True"
+                if (strcmp(path, "True\n") == 0 || strcmp(path, "True") == 0) {
+                    printf("Succeed");
+                } else if (strcmp(path, "False\n") == 0 || strcmp(path, "False") == 0) {
+                    printf("Failed to execute \"cloud az ha enable\"\n");
+                } else {
+                    printf("Failed to execute \"cloud az ha enable\"\n");
+                }
+            }
+        } else {
+            printf("Failed to execute \"cloud az ha enable\" with status %d.\n", 3);
+        }
+    }
 }
 
-void 
-cloud_az_ha_disable() 
+void
+cloud_az_ha_disable()
 {
-	FILE *fp;
-	char path[1035];
-	char cmd[1024];
-	system("ps aux | grep 'python3 /ca/bin/azure/AZFailoverPoller.py -mode 1' | grep -v grep | awk '{print $2}' | xargs kill -9");
+    FILE *fp;
+    char cmd[1024];
+    char path[1035];
+    int status;
+    // system("ps aux | grep 'python3 /ca/bin/azure/AZFailoverPoller.py -mode 1' | grep -v grep | awk '{print $2}' | xargs kill -9");
+    // Format the command string
+    snprintf(cmd, 1024, "python3 /ca/bin/azure/AZFailoverPoller.py -mode 2");
+
+    status = system(cmd);
+    sleep(1);
+    // Check if the command executed successfully
+    if (status == -1) {
+        // system() failed to start the command
+        printf("Failed to execute \"cloud az ha disable\"\n");
+
+    } else {
+        // Check if the command returned a non-zero status (failure)
+        if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
+            // Format the command string
+            snprintf(cmd, 1024, "python3 /ca/bin/azure/AZFailoverPoller.py -mode 3");
+            // Run the command and capture the return status
+            fp = popen(cmd, "r");
+            if (fp == NULL) {
+                printf("Failed to execute \"cloud az ha disable\"\n" );
+            }
+            while (fgets(path, sizeof(path)-1, fp) != NULL) {
+                path[strcspn(path, "\n")] = 0;
+                // Check if the output is "True"
+                if (strcmp(path, "True\n") == 0 || strcmp(path, "True") == 0) {
+                    printf("Failed to execute \"cloud az ha disable\"");
+                } else if (strcmp(path, "False\n") == 0 || strcmp(path, "False") == 0) {
+                    printf("");
+                } else {
+                    printf("Failed to execute \"cloud az ha disable\"");
+                }
+            }
+        } else {
+            printf("Failed to execute \"cloud az ha disable\" with status %d.\n", 3);
+        }
+    }
 }
 
-void cloud_az_ha_show() 
+void cloud_az_show_ha()
 {
 	FILE *fp;
 	char path[1035];
@@ -3118,17 +3123,27 @@
 
 	fp = popen("python3 /ca/bin/azure/AZFailoverPoller.py -mode 3", "r");
 	if (fp == NULL) {
-        printf("Failed to run command\n" );
+        printf("Failed to run command\n");
         exit(1);
     }
     while (fgets(path, sizeof(path)-1, fp) != NULL) {
-        printf("%s", path);
+        path[strcspn(path, "\n")] = 0;
+
+        // Check if the output is "True"
+        if (strcmp(path, "True\n") == 0 || strcmp(path, "True") == 0) {
+            printf("az ha on");
+        } else if (strcmp(path, "False\n") == 0 || strcmp(path, "False") == 0) {
+            printf("az ha off");
+        } else {
+            printf("Fail");
+
+        }
     }
     pclose(fp);
 }
 
-void 
-cloud_az_udr_enable() 
+void
+cloud_az_udr_enable()
 {
 	cloud_az_udr_disable();
 
@@ -3138,108 +3153,57 @@
 
 	fp = popen("python3 /ca/bin/azure/SystemRun.py 0 /tmp/az_account az account show", "r");
 	if (fp == NULL) {
-		printf("Fail\n");
-		exit(1);
-	} else {
-		pclose(fp);
-	}
-
-	fp = fopen("/tmp/az_account_0", "r");
-	if (fp == NULL) {
-		printf("Fail\n");
-		return;
+        printf("Failed to execute \"cloud az udr enable\"\n");
+        exit(1);
 	} else {
-		fclose(fp);
+        pclose(fp);
 	}
 
-	// run in background
-	snprintf(cmd, 1024, "python3 /ca/bin/azure/UDRPoller.py -mode 1 &");
-	system(cmd);
-
+    fp = fopen("/tmp/az_account_0", "r");
+    if (fp == NULL) {
+        printf("Failed to execute \"cloud az udr enable\"\n");
+        return;
+    } else {
+        fclose(fp);
+    }
+    // run in background
+    snprintf(cmd, 1024, "python3 /ca/bin/azure/UDRPoller.py -mode 1 &");
+    system(cmd);
 	sleep(2);
-	// ret = system("ps aux | grep -v grep | grep -q \"python3 /ca/bin/azure/UDRPoller.py -mode 1\"");
-	// if (ret == -1) {
-	// 	printf("Fail\n");
-	// 	return;
-	// }
-
-	// if (WIFEXITED(ret)) {
-	// 	if (WEXITSTATUS(ret) != 0) {
-	// 		printf("Fail\n");
-	// 	} else {
-	// 		printf("Success\n");
-	// 	}
-	// } else {
-	// 	printf("Fail\n");
-	// }
 
-	fp = popen("python3 /ca/bin/azure/SystemRun.py 1 /tmp/az_udr ps aux '|' grep -v grep '|' grep -q 'python3 /ca/bin/azure/UDRPoller.py -mode 1'", "r");
-	if (fp == NULL) {
-		printf("Fail\n");
-		exit(1);
-	} else {
-		pclose(fp);
-	}
+    fp = popen("python3 /ca/bin/azure/SystemRun.py 1 /tmp/az_udr ps aux '|' grep -v grep '|' grep -q 'python3 /ca/bin/azure/UDRPoller.py -mode 1'", "r");
+    if (fp == NULL) {
+        printf("Failed to execute \"cloud az udr enable\"\n");
+        exit(1);
+    } else {
+        pclose(fp);
+    }
 
-	fp = fopen("/tmp/az_udr_0", "r");
-	if (fp == NULL) {
-		printf("Fail\n");
-		return;
-	} else {
-		fclose(fp);
-	}
-	printf("Success\n");
+    fp = fopen("/tmp/az_udr_0", "r");
+    if (fp == NULL) {
+        printf("Failed to execute \"cloud az udr enable\"\n");
+        return;
+    } else {
+        fclose(fp);
+    }
+    printf("Success\n");
 
-//
-	// fp = popen("python3 /ca/bin/azure/AZFailoverPoller.py -mode 1", "r");
-	// if (fp == NULL) {
-    //     printf("Failed to run command\n" );
-    //     exit(1);
-    // }
-    // while (fgets(path, sizeof(path)-1, fp) != NULL) {
-    //     printf("%s", path);
-    // }
-    // pclose(fp);
-//
 }
 
-// void
-// cloud_az_show_udr_enable()
-// {
-// 	if (system("ps aux | grep -v grep | grep -q \"python3 /ca/bin/azure/UDRPoller.py -mode 1\"")) {
-// 		printf("Disable\n");
-// 	} else {
-// 		printf("Enable\n");
-// 	}
-// }
-
-void 
-cloud_az_udr_disable() 
+void
+cloud_az_udr_disable()
 {
 	FILE *fp;
 	char path[1035];
 	char cmd[1024];
+    int status;
 
-	// snprintf(cmd, 1024, "python3 /ca/bin/azure/AZFailoverPoller.py -mode 2");
-	// system(cmd);
-
-//
-	// fp = popen("python3 /ca/bin/azure/AZFailoverPoller.py -mode 2", "r");
-	// if (fp == NULL) {
-    //     printf("Failed to run command\n" );
-    //     exit(1);
-    // }
-    // while (fgets(path, sizeof(path)-1, fp) != NULL) {
-    //     printf("%s", path);
-    // }
-    // pclose(fp);
-//
-
-	system("ps aux | grep 'python3 /ca/bin/azure/UDRPoller.py -mode 1' | grep -v grep | awk '{print $2}' | xargs kill -9");
+	snprintf(cmd, 1024, "python3 /ca/bin/azure/AZFailoverPoller.py -mode 2");
+	status = system(cmd);
 }
 
-void 
-cloud_az_login() 
+void
+cloud_az_login()
 {
 	FILE *fp = NULL;
 	char path[1035];
@@ -3247,7 +3211,7 @@
 	char buffer[1024];
 	size_t bytesRead;
 
-// check and delete file first
+    // check and delete file first
 
 	// First File
 	fp = fopen("/tmp/login_msg.txt", "r");
@@ -3270,7 +3234,7 @@
 	snprintf(cmd, 1024, "python3 /ca/bin/azure/AZAuthManager.py -mode login &");
 	system(cmd);
 
-	printf("Please login using the above information in 1 minute.\nAfter 1 minute the login credential will be clear.\n");
+	printf("Your authentication code will expire in 60 seconds.\nPlease use the following information to sign in immediately.\n");
 	int count = 0;
 
 	// read the tmp file from Mary
@@ -3333,8 +3297,8 @@
     FILE *fp;
     char path[1035];
     char cmd[1024];
- 
-// delete output file
+
+    // delete output file
     fp = popen("/tmp/output.txt", "r");
     if (fp != NULL) {
         snprintf(cmd, 1024, "rm -rf /tmp/output.txt");
@@ -3434,53 +3398,9 @@
 		}
 		fclose(fp);
 	}
-
-	// fp = popen("az account show", "r");
-	// if (fp == NULL) {
-	// 	printf("Please run 'cloud az login' to setup account. 2");
-	// 	return;
-	// } else {
-	// 	while (fgets(path, sizeof(path)-1, fp) != NULL) {
-	// 		printf("%s", path);
-	// 	}
-	// 	pclose(fp);
-	// }
-
-
-
-
-	// int ret = system("az account show");
-	// printf("1: %d\n", ret);
-	// if (ret == -1) {
-	// 	printf("Please run 'cloud az login' to setup account. 1");
-	// 	return;
-	// }
-
-	// if (WIFEXITED(ret)) {
-	// 	printf("2: %d\n", WEXITSTATUS(ret));
-	// 	if (WEXITSTATUS(ret) != 0) {
-	// 		printf("Please run 'cloud az login' to setup account. 2");
-	// 		return;
-	// 	}
-	// } else {
-	// 	printf("Please run 'cloud az login' to setup account. 3");
-	// 	return;
-	// }
-	
-	// fp = popen("az account show", "r");
-	// if (fp == NULL) {
-	// 	printf("Please run 'cloud az login' to setup account.");
-	// 	exit(1);
-	// } else {
-	// 	while (fgets(path, sizeof(path)-1, fp) != NULL) {
-	// 		printf("%s", path);
-	// 	}
-	// 	pclose(fp);
-	// }
-//
 }
 
-void cloud_az_failover_trigger() 
+void cloud_az_failover_trigger()
 {
 	FILE *fp;
 	char path[1035];
@@ -3544,18 +3464,27 @@
         exit(1);
     }
     while (fgets(path, sizeof(path)-1, fp) != NULL) {
-        printf("%s", path);
+        path[strcspn(path, "\n")] = 0;
+
+        // Check if the output is "True"
+        if (strcmp(path, "True\n") == 0 || strcmp(path, "True") == 0) {
+            printf("az log on");
+        } else if (strcmp(path, "False\n") == 0 || strcmp(path, "False") == 0) {
+			printf("az log off");
+        } else {
+			exit(1);
+		}
     }
     pclose(fp);
 
 }
 
-void cloud_az_show_log_buffer()
+void cloud_az_show_log_buffer(uint32_t number_of_line)
 {
 	FILE *fp;
 	char path[1035];
 	char cmd[1024];
-	snprintf(cmd, 1024, "python3 /ca/bin/azure/LoggerManager.py -mode show");
+	snprintf(cmd, 1024, "python3 /ca/bin/azure/LoggerManager.py -mode show -lines %d", number_of_line);
 	fp = popen(cmd, "r");
 	if (fp == NULL) {
         printf("Failed to run command\n" );
Index: /branches/rel_apv_10_7_2_13_pre_sight/usr/click/lib/libparser/commands.pm
===================================================================
--- /branches/rel_apv_10_7_2_13_pre_sight/usr/click/lib/libparser/commands.pm	(revision 38979)
+++ /branches/rel_apv_10_7_2_13_pre_sight/usr/click/lib/libparser/commands.pm	(working copy)
@@ -90,16 +90,16 @@
 		function_args => [],
 	},
 
-	# cloud az ha show
+	# cloud az show ha
 
 	{
 		obj_type => "ITEM",
-		name => "show",
-		menu => "root_cloud_azure_ha",
-		help_string => "Disable both Failover and Recover function in Azure",
+		name => "ha",
+		menu => "root_cloud_azure_show",
+		help_string => "Show Azure ha status",
 		cmd_attribute => "CMD_ARRAYOS|CMD_SPROXY|CMD_NORMAL|CMD_KILLABLE|CMD_NON_MORE",
 		user_level => "CLI_LEVEL_CONFIG",
-		function_name => "cloud_az_ha_show",
+		function_name => "cloud_az_show_ha",
 		function_args => [],
 	},
 
@@ -260,35 +260,32 @@
 		obj_type => "ITEM",
 		name => "nicconfig",
 		menu => "root_cloud_azure_set",
-		cmd_attribute => "CMD_ARRAYOS|CMD_SPROXY|CMD_NORMAL|CMD_KILLABLE|CMD_NON_MORE",	
+		cmd_attribute => "CMD_ARRAYOS|CMD_SPROXY|CMD_NORMAL|CMD_KILLABLE|CMD_NON_MORE",
 		user_level => "CLI_LEVEL_CONFIG",
 		help_string => "Set the configuration of NIC",
 		function_name => "cloud_az_set_nicconfig",
 		function_args => [
-								 {
-                                        type => "STRING",
-										help_string => "Enter subscription ID: ",
-                                        optional => "NO",
-
-                                 }, 
-   								 {
-                                        type => "STRING",
-										help_string => "Enter resource group name: ",
-                                        optional => "NO",
-                                 }, 
-								 {
-                                        type => "STRING",
-										help_string => "Enter NIC name of the primary machine: ",
-                                        optional => "NO",
-
-                                 }, 
-								 {
-                                        type => "STRING",
-										help_string => "Enter NIC name of the secondary machine: ",
-                                        optional => "NO",
-
-                                 }, 
-				 		 ],
+			{
+				type => "STRING",
+				help_string => "Subscription ID",
+				optional => "NO",
+				},
+				{
+				type => "STRING",
+				help_string => "Resource Group Name",
+				optional => "NO",
+				},
+				{
+				type => "STRING",
+				help_string => "NIC name of the active APV",
+				optional => "NO",
+				},
+				{
+				type => "STRING",
+				help_string => "NIC name of the standby APV",
+				optional => "NO",
+				},
+		],
 	},
 
     # cloud az set udrconfig
@@ -297,40 +294,37 @@
 		obj_type => "ITEM",
 		name => "udrconfig",
 		menu => "root_cloud_azure_set",
-		cmd_attribute => "CMD_ARRAYOS|CMD_SPROXY|CMD_NORMAL|CMD_KILLABLE|CMD_NON_MORE",	
+		cmd_attribute => "CMD_ARRAYOS|CMD_SPROXY|CMD_NORMAL|CMD_KILLABLE|CMD_NON_MORE",
 		user_level => "CLI_LEVEL_CONFIG",
 		help_string => "Set the configuration of UDR",
 		function_name => "cloud_az_set_udrconfig",
 		function_args => [
-								 {
-                                        type => "STRING",
-										help_string => "Enter subscription ID: ",
-                                        optional => "NO",
-
-                                 }, 
-   								 {
-                                        type => "STRING",
-										help_string => "Enter resource group name: ",
-                                        optional => "NO",
-                                 }, 
-                                 {
-                                        type => "STRING",
-										help_string => "Enter vm name: ",
-                                        optional => "NO",
-                                 }, 
-								 {
-                                        type => "IPADDR",
-										help_string => "Enter ip of set on UDR while monitored vm is up: ",
-                                        optional => "NO",
-
-                                 }, 
-								 {
-                                        type => "IPADDR",
-										help_string => "Enterip of set on UDR while monitored vm is down: ",
-                                        optional => "NO",
-
-                                 }, 
-				 		 ],
+			{
+			type => "STRING",
+			help_string => "Subscription ID",
+			optional => "NO",
+			},
+			{
+			type => "STRING",
+			help_string => "Resource Group Name",
+			optional => "NO",
+			},
+			{
+			type => "STRING",
+			help_string => "Virtual Machine Name",
+			optional => "NO",
+			},
+			{
+			type => "IPADDR",
+			help_string => "The IP address in UDR when monitored virtual machine is up",
+			optional => "NO",
+			},
+			{
+			type => "IPADDR",
+			help_string => "The IP address in UDR when monitored virtual machine is down",
+			optional => "NO",
+			},
+						],
 	},
 
     # cloud az set subscription
@@ -529,7 +523,14 @@
 		user_level => "CLI_LEVEL_CONFIG",
 		help_string => "Show the log of az tools",
 		function_name => "cloud_az_show_log_buffer",
-		function_args => [],
+		function_args => [
+			{
+				type => "U32",
+				help_string => "Enter the number of shown line",
+				optional => "YES",
+				default_value => "0",
+			}
+		],
 	},
 
 	# cloud az show log loglevel
Index: /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/AZFailoverPoller.py
===================================================================
--- /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/AZFailoverPoller.py	(revision 38979)
+++ /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/AZFailoverPoller.py	(working copy)
@@ -16,7 +16,6 @@
     def __init__(self) -> None:
         pass
     def start(self, ip_config_setting_json):
-        
         in_failover = False
         polling_period = 1 #seconds
         apv_contronller = APVController()
@@ -60,7 +59,6 @@
                 # reset
                 in_failover = False
 
-
     def kill_poller(self, process_name):
         '''This method will kill all the process with the same name of process_name.'''
         for proc in psutil.process_iter(['pid', 'cmdline']):
@@ -111,17 +109,16 @@
 
     if args.mode=='1':
         if not az_poller.is_poller_running(args.mode):
-            ProxyAZLogger.info("start polling mode")    
+            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':
-        if not az_poller.is_poller_running(args.mode):
+        if az_poller.is_poller_running(args.mode):
             ProxyAZLogger.info("stop polling mode")
             az_poller.stop()
         else:
-            ProxyAZLogger.info("try to stop polling mode, but the poller isn't running")    
+            ProxyAZLogger.info("try to stop polling mode, but the poller isn't running")
     elif args.mode=="3":
         status = az_poller.is_poller_running(args.mode)
         print(status)
@@ -129,7 +126,7 @@
             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_2_13_pre_sight/usr/click/tools/azure/ConfigManager.py
===================================================================
--- /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/ConfigManager.py	(revision 38979)
+++ /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/ConfigManager.py	(working copy)
@@ -37,6 +37,9 @@
 
     def show_ip_config(self, idx=0):
         ip_config_setting_json = self.get_ip_config()
+        if not ip_config_setting_json:
+            print("No NIC configuration")
+            return
         try:
             if idx == 0:
                 for idx in ip_config_setting_json:
Index: /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/LoggerManager.py
===================================================================
--- /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/LoggerManager.py	(revision 38979)
+++ /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/LoggerManager.py	(working copy)
@@ -20,9 +20,21 @@
     def check_Logger_level_state(cls)->str:
         return ProxyAZLogger.get_Logger_level_state()
     @classmethod
-    def get_log(cls, number_of_line:int=None)->str:
+    def get_log(cls, number_of_line: int = None) -> None:
+        log_list = ProxyAZLogger.get_log_list()
+        reverse_log_list = list(reversed(log_list))
+        shown_log_list = []
+        if number_of_line==0:
+            # print all log
+            shown_log_list = reverse_log_list
+        else:
+            # print log according to the number of line
+            shown_log_list = reverse_log_list[:number_of_line]
+        for line in shown_log_list:
+            print(line.strip())
+    @classmethod
+    def show_log(cls, number_of_line: int = None) -> str:
         res = ProxyAZLogger.get_log()
-        return res
     @classmethod
     def set_logger_level(cls, level:str)->None:
         ProxyAZLogger.info(f"set new log severity: {level}")
@@ -41,6 +53,8 @@
     parser = argparse.ArgumentParser(description=description)
     parser.add_argument('-mode', type=str, choices=["on", "off", "show", "status", "getlogpath"], help='Enter [on], [off], [getlogpath], or [show]')
     parser.add_argument('-level', type=str, choices=["debug", "info", "warning", "error", "status"], help='choose severity amond [debug], [info], [warning], or [error]')
+    parser.add_argument('-lines', type=int, help='the number of line of shown log', default=0)
+
     args = parser.parse_args()
 
     # set severity
@@ -55,12 +69,8 @@
     elif args.mode=="off":
         LoggerManager.turn_off_logger()
     elif args.mode=="show":
-        log = LoggerManager.get_log()
-        print(log)
+        log = LoggerManager.get_log(args.lines)
     elif args.mode=="status":
         print(LoggerManager.check_Logger_state())
     elif args.mode=="getlogpath":
         print(LoggerManager.get_log_file_path())
-
-
-    
Index: /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/RouteConfigManager.py
===================================================================
--- /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/RouteConfigManager.py	(revision 38979)
+++ /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/RouteConfigManager.py	(working copy)
@@ -37,15 +37,18 @@
         print(f"    The required ip while monitored vm is down: {single_data['target_ip_when_deallocated']}")
 
     def show_UDR_config(self, idx=0):
-        ip_config_setting_json = self.get_UDR_config()
+        udr_config_setting_json = self.get_UDR_config()
+        if not udr_config_setting_json:
+            print("No UDR configuration")
+            return
         try:
             if idx == 0:
-                for idx in ip_config_setting_json:
-                    data = ip_config_setting_json[idx]
+                for idx in udr_config_setting_json:
+                    data = udr_config_setting_json[idx]
                     self.print_UDR_config(idx, data)
             else:
-                if f"{idx}" in ip_config_setting_json:
-                    data = ip_config_setting_json[f"{idx}"]
+                if f"{idx}" in udr_config_setting_json:
+                    data = udr_config_setting_json[f"{idx}"]
                     self.print_UDR_config(idx, data)
         except Exception:
             print("Error: No ip configuration found. Set it before examine it.")
Index: /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/apv_controller/APVController.py
===================================================================
--- /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/apv_controller/APVController.py	(revision 38979)
+++ /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/apv_controller/APVController.py	(working copy)
@@ -1,9 +1,10 @@
-# from apv_controller.APVCommander import APVCommander
 import re
 import subprocess
 import argparse
 from collections import deque
 
+from logger.ProxyAZLogger import ProxyAZLogger
+
 class APVCommander():
     def __init__(self) -> None:
         pass
@@ -100,9 +101,10 @@
         pattern ='ha group priority \"(.+)\" [\d]+ (\d+)' # need to be checked
         group_priority_list = re.findall(pattern, context)
         if not group_priority_list:
-            error_msg = "Error: cannot find APV group priority in "+context
-            raise Exception(error_msg)
-        
+            error_msg = "Error: cannot find APV group priority in " + context
+            ProxyAZLogger.erro(error_msg)
+            exit(1)
+
         group_priority_list = [(item[0], int(item[1])) for item in group_priority_list] # make priority of string to integer
 
         sorted_group_priority_list = sorted(group_priority_list, key=lambda x: x[1]) #from low priority to heigh priority
@@ -123,14 +125,14 @@
         pattern ='Peer[\s]+unit:[\s]+(.+)\s(UP|DOWN)\s*'
         peer_up_or_down_list = re.findall(pattern, context)
         print(peer_up_or_down_list)
-        
+
         # print("peer_up_or_down_list", peer_up_or_down_list)
-        
+
         if not peer_up_or_down_list:
             error_msg = "Error: cannot parse peer status in "+ context
-            raise Exception(error_msg)
-        
-        
+            ProxyAZLogger.erro(error_msg)
+            exit(1)
+
         import sys
         from datetime import datetime
         file = open('/tmp/heartbeat_workaround.txt', 'a')
Index: /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/az_auth/AZAuthController.py
===================================================================
--- /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/az_auth/AZAuthController.py	(revision 38979)
+++ /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/az_auth/AZAuthController.py	(working copy)
@@ -50,9 +50,9 @@
         if not len(matches)==0:
             print("write file")
             file.write(matches[0])
-        
+
         if result.returncode==0:
-            print("Succeefully log in az account.")
+            print("Successfully signed in the Azure account.")
         else:
             print("Fail to log in az account.\n")
             print("result", result)
@@ -62,7 +62,7 @@
         # print("Execute command ", " ".join(command))
         result = subprocess.run(command, stdout=sys.stdout, stderr=sys.stderr)
         if result.returncode==0:
-            print("Succeefully log out az account.")
+            print("Successfully signed out of the Azure account.")
         else:
             print("Fail to log out az account.\n")
 
Index: /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/logger/ProxyAZLogger.py
===================================================================
--- /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/logger/ProxyAZLogger.py	(revision 38979)
+++ /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/logger/ProxyAZLogger.py	(working copy)
@@ -91,6 +91,12 @@
             content = file.read()
         return content
     @classmethod
+    def get_log_list(cls) -> list:
+        '''return a list of content of log file'''
+        with open(cls.get_log_file_path(), "r") as file:
+            lines = file.readlines()
+        return lines
+    @classmethod
     def get_Logger_state(cls)->bool:
         '''This is used to check if logger is on or not
         return True if logger is on
Index: /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/logger/config.json
===================================================================
--- /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/logger/config.json	(revision 38979)
+++ /branches/rel_apv_10_7_2_13_pre_sight/usr/click/tools/azure/logger/config.json	(working copy)
@@ -1,7 +1,7 @@
 {
     "log_path": "/var/crash/azure_ha.log",
     "log_format": "[%(asctime)s] - [%(levelname)s] %(message)s",
-    "max_size_log_file": 0,
+    "max_size_log_file": 10,
     "level_of_severity": "info",
     "datefmt": "%Y-%m-%dT%H:%M:%S",
     "is_logger_on": true
