Index: /branches/rel_apv_10_7/usr/click/bin/backend/backend.c
===================================================================
--- /branches/rel_apv_10_7/usr/click/bin/backend/backend.c	(revision 38590)
+++ /branches/rel_apv_10_7/usr/click/bin/backend/backend.c	(working copy)
@@ -2675,7 +2675,31 @@
 		if (local_cmd_attr & CMD_NON_MORE) {
 			more_off();
 		}
-		
+
+		/* Bug 1184 : 
+		 *	When the user inputs the "log off" command, logging will no longer be recorded. 
+		 *	Implement a workaround so that a log entry is written before the "log off" command is executed, 
+		 *	ensuring that the "log off" action is captured in the logs.
+		 */
+		if (strncmp(buf, "log off", strlen("log off")) == 0) {
+			fastlog_config_data_t *config;
+			char cmd[MAX_LINE_SIZE + 5];
+			int len;
+			if (kern_fastlog_cli_get_config(&config, &len) < 0) {
+				return -1;
+			}
+			if (len != sizeof(fastlog_config_data_t) || config == NULL) {
+				return -1;
+			}
+			if (config->is_on) {
+				/* take out newline */
+				strncpy(cmd, buf, MAX_LINE_SIZE + 4);
+				filt_last_newline(cmd);
+				rtrim(cmd);
+				fastlog_logex(CLI_CMD, 2, sess_state.login_account, cmd);
+			}
+		}
+
 		/*this time really run this command*/
 		yyparse_one_cmd(buf, FALSE);
 		
