Index: /branches/rel_apv_10_7_3/usr/click/bin/backend/sys_cmd.c
===================================================================
--- /branches/rel_apv_10_7_3/usr/click/bin/backend/sys_cmd.c	(revision 39050)
+++ /branches/rel_apv_10_7_3/usr/click/bin/backend/sys_cmd.c	(working copy)
@@ -3864,12 +3864,13 @@
     pclose(fp);
 }
 
-void cloud_aws_show_log_buffer()
+void cloud_aws_show_log_buffer(uint32_t num_of_lines)
 {
 	FILE *fp;
 	char path[1035];
 	char cmd[1024];
-	snprintf(cmd, 1024, "python3 /ca/bin/aws/LoggerManager.py -mode show");
+	snprintf(cmd, sizeof(cmd), "python3 /ca/bin/aws/LoggerManager.py -mode show -num-lines %u", num_of_lines);
+
 	fp = popen(cmd, "r");
 	if (fp == NULL) {
         printf("Failed to run command\n" );
Index: /branches/rel_apv_10_7_3/usr/click/lib/libparser/commands.pm
===================================================================
--- /branches/rel_apv_10_7_3/usr/click/lib/libparser/commands.pm	(revision 39050)
+++ /branches/rel_apv_10_7_3/usr/click/lib/libparser/commands.pm	(working copy)
@@ -1084,7 +1084,13 @@
 		cmd_attribute => "CMD_ARRAYOS|CMD_SPROXY|CMD_NORMAL|CMD_KILLABLE|CMD_NON_MORE",
 		user_level => "CLI_LEVEL_CONFIG",
 		function_name => "cloud_aws_show_log_buffer",
-		function_args => [],
+		function_args => [{
+								type => "U32",
+								help_string => "Enter the number of shown line",
+								optional => "YES",
+								default_value => "0",
+							},
+		],
 	},
 
 	# cloud aws show log severity
Index: /branches/rel_apv_10_7_3/usr/click/tools/aws/LoggerManager.py
===================================================================
--- /branches/rel_apv_10_7_3/usr/click/tools/aws/LoggerManager.py	(revision 39050)
+++ /branches/rel_apv_10_7_3/usr/click/tools/aws/LoggerManager.py	(working copy)
@@ -1,41 +1,32 @@
 import argparse
-
 from logger.ProxyAWSLogger import ProxyAWSLogger
 
 
 class LoggerManager():
-    """Manages logging functionality using ProxyAWSLogger."""
-
-
     def __init__():
         pass
 
     @classmethod
     def turn_on_logger(cls) -> None:
-        """Turns on the logger."""
         ProxyAWSLogger.debug("Turn on log functionality.")
         ProxyAWSLogger.turn_on()
 
     @classmethod
     def turn_off_logger(cls) -> None:
-        """Turns off the logger."""
         ProxyAWSLogger.debug("Turn off log functionality.")
         ProxyAWSLogger.turn_off()
 
     @classmethod
     def check_Logger_state(cls) -> bool:
-        """Checks if the logger is on."""
         return ProxyAWSLogger.get_is_logger_on()
 
     @classmethod
     def check_Logger_level_state(cls) -> str:
-        """Checks the current log level state."""
         return ProxyAWSLogger.get_Logger_level_state()
 
     @classmethod
-    def get_log(cls, number_of_line: int = None) -> str:
-        """Retrieves log messages."""
-        res = ProxyAWSLogger.get_log()
+    def get_log(cls, number_of_line: int = 0) -> str:
+        res = ProxyAWSLogger.get_log(number_of_line)
         return res
 
     @classmethod
@@ -46,26 +37,23 @@
     @classmethod
     def get_log_file_path(cls) -> str:
         log_file_path = ProxyAWSLogger.get_log_file_path()
-        ProxyAWSLogger.info("get log file path")
+        ProxyAWSLogger.info("get log file path: "+log_file_path)
         return log_file_path
 
 
 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.
-        4. Set the log severity and show log severity.
-        """
-    )
-
+    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
+    4. set the log severity and show log severity'''
     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('-num-lines', type=int, help='number of log lines to print', default=0)
     args = parser.parse_args()
 
     # set severity
@@ -80,7 +68,8 @@
     elif args.mode == "off":
         LoggerManager.turn_off_logger()
     elif args.mode == "show":
-        print(LoggerManager.get_log())
+        log = LoggerManager.get_log(args.num_lines)
+        print(log)
     elif args.mode == "status":
         print(LoggerManager.check_Logger_state())
     elif args.mode == "getlogpath":
Index: /branches/rel_apv_10_7_3/usr/click/tools/aws/logger/ProxyAWSLogger.py
===================================================================
--- /branches/rel_apv_10_7_3/usr/click/tools/aws/logger/ProxyAWSLogger.py	(revision 39050)
+++ /branches/rel_apv_10_7_3/usr/click/tools/aws/logger/ProxyAWSLogger.py	(working copy)
@@ -1,19 +1,17 @@
-
 import os
 import json
-
-from logger.AWSLogger import AbstractAWSLogger, AWSLogger
-
+from logger.AWSLogger import AbstractAWSLogger
+from logger.AWSLogger import AWSLogger
 
 class ProxyAWSLogger(AbstractAWSLogger):
-    """
+    '''
     This class is designed using the proxy pattern,
     a structural design pattern.
     Because there is a requirement of dynamically changing
     the level of severity,
     we use a proxy to determine if the configuration file is changed or not in
     order to keep the AWSLogger class pure.
-    """
+    '''
     config_modified_indicator_file = os.path.join(
         AWSLogger.current_module_directory, 'config_modified.txt')
     with open(AWSLogger.config_file_path, 'r') as config_file:
@@ -22,7 +20,7 @@
 
     @classmethod
     def get_config(cls) -> dict:
-        """THe usage of this method refers to the set_config()"""
+        '''THe usage of this method refers to the set_config()'''
         try:
             with open(AWSLogger.config_file_path, 'r') as config_file:
                 config = json.load(config_file)
@@ -35,7 +33,7 @@
 
     @classmethod
     def set_config(cls, config: dict) -> None:
-        """The suggested method to modify configuration file is to use
+        '''The suggested method to modify configuration file is to use
         get_config() method
         to get the original configuration dictionary, modify
         the dictionary objecct, and invoke set_config() with
@@ -44,7 +42,7 @@
         1. take input to override the original config dictionary.
         2. write the file.
         3. set config file modified indictor
-        """
+        '''
         # AWSLogger.info(f"setting new config: {config}")
         ori_config = cls.get_config()
         for key in ori_config.keys():
@@ -56,13 +54,13 @@
 
     @classmethod
     def is_config_modified(cls) -> bool:
-        """This method is used to check if the configuration file
+        '''This method is used to check if the configuration file
         is modified or not.
         The alogrithem to do that is check if there is the modified
         file existed.
         If the file existed, the configuration file is modified;
         otherwise, the configuration is unchaged.
-        """
+        '''
         return os.path.exists(cls.config_modified_indicator_file)
 
     @classmethod
@@ -83,10 +81,10 @@
 
     @classmethod
     def turn_on(cls) -> None:
-        """This on off functionality is on off all the invoking debug, info,
+        '''This on off functionality is on off all the invoking debug, info,
         warning, and error method using ProxyAWSLogger class.
         That is, if the client directly use AWSLogger, the message is still be
-        logger. However, it's not recommanded"""
+        logger. However, it's not recommanded'''
         config = cls.get_config()
         config["is_logger_on"] = True
         cls.set_config(config)
@@ -95,10 +93,10 @@
 
     @classmethod
     def turn_off(cls) -> None:
-        """This on off functionality is on off all the invoking debug, info,
+        '''This on off functionality is on off all the invoking debug, info,
         warning, and error method using ProxyAWSLogger class.
         That is, if the client directly use AWSLogger, the message is still
-        be logger. However, it's not recommanded"""
+        be logger. However, it's not recommanded'''
         config = cls.get_config()
         config["is_logger_on"] = False
         cls.set_config(config)
@@ -106,28 +104,30 @@
         # cls.is_logger_on = False
 
     @classmethod
-    def get_log(cls) -> str:
-        """return a string of content of log file"""
+    def get_log(cls, number_of_line: int = 0) -> str:
+        """Return a string of log file content, optionally limited to the last `number_of_line` lines."""
         config = cls.get_config()
         with open(config["log_path"], 'r', encoding='utf-8') as file:
-            content = file.read()
-        return content
+            if number_of_line == 0:
+                return file.read()  # Read the entire file if no line limit is provided
+            else:
+                return ''.join(file.readlines()[-number_of_line:])
 
     @classmethod
     def get_is_logger_on(cls) -> bool:
-        """This is used to check if logger is on or not
+        '''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,
+        '''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"]
 
@@ -188,4 +188,4 @@
             )
             ProxyAWSLogger.set_config(cur_config)
             print("change level")
-        time.sleep(2)
+        time.sleep(2)
\ No newline at end of file
