VOL-538: asfvolt16: driver should be able to direct log messages to syslog

Change-Id: Idf008aa264ae19f2dee58599bf89248b3a47855c
diff --git a/device_simulator/voltha_bal_driver.c b/device_simulator/voltha_bal_driver.c
index c430b64..a645978 100755
--- a/device_simulator/voltha_bal_driver.c
+++ b/device_simulator/voltha_bal_driver.c
@@ -58,12 +58,12 @@
       if(return_value == GRPC_C_WRITE_PENDING)
       {
          /* TODO: Register call back with grpc-c which will give an indication whenever write was succussful */
-         ASFVOLT_LOG(ASFVOLT_INFO, "write(%d) is pending, sleep for 5 sec\n", return_value);
+         ASFVOLT_LOG(ASFVOLT_INFO, "write(%d) is pending, sleep for 5 sec", return_value);
          sleep(5);
       }
       else
       {
-         ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write %d \n", return_value);
+         ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write %d", return_value);
       }
    }
 
@@ -107,7 +107,7 @@
      */
     if (context->gcc_stream->finish(context, &status))
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status");
     }
 }
 
@@ -128,8 +128,7 @@
       context->gcc_stream->read(context, (void **)&read_device, 0);
    }
 
-   ASFVOLT_LOG(ASFVOLT_INFO, "Bal Server - Reboot : ======Entering Function Reboot ==============================\n");
-   ASFVOLT_LOG(ASFVOLT_INFO, "Bal Server - Reboot : Device ID is %s\n",read_device->device_id);
+   ASFVOLT_LOG(ASFVOLT_INFO, "Bal Server - Reboot : Device ID is %s",read_device->device_id);
 
    /*
     * send it to BAL
@@ -153,7 +152,7 @@
     */
     if (context->gcc_stream->finish(context, &status))
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status");
     }
 
    ret_val = system("shutdown -r now");
@@ -177,8 +176,7 @@
        context->gcc_stream->read(context, (void **)&read_stats, 0);
     }
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Bal Server - Get Stats :======Entering Function Get Stats ============\n");
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Bal Server - Get Stats :NNI port is %d\n",read_stats->intf_id);
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Bal Server - Get Stats :NNI port is %d",read_stats->intf_id);
 
     BalInterfaceStat get_stats;
     memset(&get_stats, 0, sizeof(BalInterfaceStat));
@@ -198,7 +196,7 @@
     asfvolt16_bal_stats_get(read_stats->intf_type, read_stats->intf_id, &stat_data, &stat_key);
 #else
     stub_bal_stats_get(&stat_data);
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Bal Server - Get Stats In BalStubs : Got all the statistics\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Bal Server - Get Stats In BalStubs : Got all the statistics");
 #endif
 
     get_stats.data = &stat_data;
@@ -215,7 +213,7 @@
     */
     if (context->gcc_stream->finish(context, &status))
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status");
     }
 }
 
@@ -277,7 +275,7 @@
     */
    if (context->gcc_stream->finish(context, &status))
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status\n");
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status");
    }
 
 #ifdef BAL_STUB
@@ -291,25 +289,19 @@
    {
       case BAL_OBJ_ID__BAL_OBJ_ID_ACCESS_TERMINAL:
          {
-            ASFVOLT_LOG(ASFVOLT_INFO, "\n***************************************************\n");
-            ASFVOLT_LOG(ASFVOLT_INFO, "Received Access Terminal Configuration msg\n");
-            ASFVOLT_LOG(ASFVOLT_INFO, "***************************************************\n");
+            ASFVOLT_LOG(ASFVOLT_INFO, "Received Access Terminal Configuration msg");
          }
          break;
       case BAL_OBJ_ID__BAL_OBJ_ID_INTERFACE:
          {
-            ASFVOLT_LOG(ASFVOLT_INFO, "\n***************************************************\n");
-            ASFVOLT_LOG(ASFVOLT_INFO, "Received PON Interface Configuration msg\n");
-            ASFVOLT_LOG(ASFVOLT_INFO, "***************************************************\n");
+            ASFVOLT_LOG(ASFVOLT_INFO, "Received PON Interface Configuration msg");
             temp->intf_id = set_cfg->interface->key->intf_id;
-            ASFVOLT_LOG(ASFVOLT_INFO, "Pon ID = %d\n", temp->intf_id);
+            ASFVOLT_LOG(ASFVOLT_INFO, "Pon ID = %d", temp->intf_id);
          }
          break;
       case BAL_OBJ_ID__BAL_OBJ_ID_SUBSCRIBER_TERMINAL:
          {
-            ASFVOLT_LOG(ASFVOLT_INFO, "\n*****************************************************\n");
-            ASFVOLT_LOG(ASFVOLT_INFO, "Received ONU Activation msg\n");
-            ASFVOLT_LOG(ASFVOLT_INFO, "*****************************************************\n");
+            ASFVOLT_LOG(ASFVOLT_INFO, "Received ONU Activation msg");
             temp->intf_id = set_cfg->terminal->key->intf_id;
             temp->onu_id = set_cfg->terminal->key->sub_term_id;
             memset(temp->vendor_id, 0, BAL_DEVICE_STR_LEN);
@@ -324,9 +316,7 @@
          break;
       case BAL_OBJ_ID__BAL_OBJ_ID_TM_SCHED:
          {
-            ASFVOLT_LOG(ASFVOLT_INFO, "\n*****************************************************\n");
-            ASFVOLT_LOG(ASFVOLT_INFO, "Received TM schedule msg\n");
-            ASFVOLT_LOG(ASFVOLT_INFO, "*****************************************************\n");
+            ASFVOLT_LOG(ASFVOLT_INFO, "Received TM schedule msg");
          }
          break;
     case BAL_OBJ_ID__BAL_OBJ_ID_PACKET:
@@ -335,18 +325,14 @@
           {
              case BAL_DEST_TYPE__BAL_DEST_TYPE_ITU_OMCI_CHANNEL:
                 {
-                   ASFVOLT_LOG(ASFVOLT_INFO, "\n*****************************************************\n");
-                   ASFVOLT_LOG(ASFVOLT_INFO, "Received OMCI msg\n");
-                   ASFVOLT_LOG(ASFVOLT_INFO, "*****************************************************\n");
+                   ASFVOLT_LOG(ASFVOLT_INFO, "Received OMCI msg");
                    temp->intf_id = set_cfg->terminal->key->intf_id;
                    temp->onu_id = set_cfg->terminal->key->sub_term_id;
                 }
                 break;
              default:
                 {
-                   ASFVOLT_LOG(ASFVOLT_INFO, "\n*****************************************************\n");
-                   ASFVOLT_LOG(ASFVOLT_INFO, "Dest type invalid\n");
-                   ASFVOLT_LOG(ASFVOLT_INFO, "*****************************************************\n");
+                   ASFVOLT_LOG(ASFVOLT_INFO, "Dest type invalid");
                 }
                 break;
           }
@@ -354,9 +340,7 @@
        break;
     default:
        {
-          ASFVOLT_LOG(ASFVOLT_INFO, "\n*****************************************************\n");
-          ASFVOLT_LOG(ASFVOLT_INFO, "Received Invalid msg type === %d \n", set_cfg->hdr->obj_type);
-          ASFVOLT_LOG(ASFVOLT_INFO, "*****************************************************\n");
+          ASFVOLT_LOG(ASFVOLT_INFO, "Received Invalid msg type === %d", set_cfg->hdr->obj_type);
           pthread_mutex_unlock(&lock);
           return;
        }
@@ -417,9 +401,7 @@
     * send it to BAL
     */
 
-   ASFVOLT_LOG(ASFVOLT_INFO, "\n*****************************************************\n");
-   ASFVOLT_LOG(ASFVOLT_INFO, "Received API Init msg\n");
-   ASFVOLT_LOG(ASFVOLT_INFO, "*****************************************************\n");
+   ASFVOLT_LOG(ASFVOLT_INFO, "Received API Init msg");
 
    bal_err__init(&bal_err);
 
@@ -439,13 +421,13 @@
     */
    if (context->gcc_stream->finish(context, &status))
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status\n");
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status");
    }
 
 #ifndef BAL_STUB
    asfvolt16_bal_init(bal_init, &coreIpPortInfo);
 #else
-   ASFVOLT_LOG(ASFVOLT_INFO, "\nRecevied IP Address == %s \n", bal_init->voltha_adapter_ip_port);
+   ASFVOLT_LOG(ASFVOLT_INFO, "Received IP Address == %s", bal_init->voltha_adapter_ip_port);
    stub_bal_init(bal_init);
 #endif
 
@@ -777,7 +759,7 @@
           break;
 
        default:
-          ASFVOLT_LOG(ASFVOLT_ERROR, "Unknown case %u\n", balIndCfg->u_case);
+          ASFVOLT_LOG(ASFVOLT_ERROR, "Unknown BAL indication %u", balIndCfg->u_case);
           break;
     }
 }
@@ -834,7 +816,7 @@
     */
    if (context->gcc_stream->finish(context, &status))
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status\n");
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to write status");
    }
 
    /*Free memory for 'bal_indication' and 'node'*/
@@ -915,6 +897,24 @@
 {
 }
 
+/*
+**    ASFVOLT_HEX2LOG(ASFVOLT_DEBUG, "OMCI Response with %zd bytes is",
+**       balIndCfg.balomciresp->data->pkt.data, balIndCfg.balomciresp->data->pkt.len);
+*/
+#define SYSLOG_MAX_SIZE 1024
+void asfvolt_hexlog2(int prio, const char *_file_loc, int _file_line, const char *pFormat, void* pData, size_t len)
+{
+      unsigned char *inpPtr = pData;
+      char tempBuf[SYSLOG_MAX_SIZE];
+      size_t idx = 0;
+
+      idx += snprintf(tempBuf+idx, SYSLOG_MAX_SIZE-1, pFormat, len);
+      while (len-- > 0 && idx < SYSLOG_MAX_SIZE)
+      {
+         idx += snprintf(tempBuf+idx, SYSLOG_MAX_SIZE-idx, "%02x", *inpPtr++);
+      }
+      ASFVOLT_LOG_LOC(prio, _file_loc, _file_line, "%s", tempBuf);
+}
 
 /*
  * Takes socket path as argument
@@ -936,6 +936,14 @@
    strcpy(coreIpPortInfo.bal_shared_lib_ip_port, argv[5]/*, strlen(argv[5])*/);
 
    signal(SIGINT, sigint_handler);
+
+   /*
+   ** syslog initialization
+   */
+   //setlogmask (LOG_UPTO (LOG_NOTICE));
+
+   openlog (ASFVOLT_SYSLOG_NAME, ASFVOLT_SYSLOG_MODE, LOG_LOCAL1);
+
    /*
     * Initialize grpc-c library to be used with vanilla gRPC
     */
@@ -948,14 +956,14 @@
 
    if (test_server == NULL)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to create server\n");
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to create server");
       exit(1);
    }
 
    /*
     * Initialize greeter service
     */
-   ASFVOLT_LOG(ASFVOLT_INFO, "\nvoltha_bal_driver running.....\n");
+   ASFVOLT_LOG(ASFVOLT_INFO, "voltha_bal_driver running.....");
    bal__service_init(test_server);
    bal_get_ind__service_init(test_server);
 
diff --git a/src/asfvolt16_driver.c b/src/asfvolt16_driver.c
index 662c94c..14cd505 100755
--- a/src/asfvolt16_driver.c
+++ b/src/asfvolt16_driver.c
@@ -31,6 +31,13 @@
 #include "bal_packet_hdlr.h"
 #include "bal_indications_hdlr.h"
 
+#if 0
+#include "bal_api_end.h"  /* Use when BAL -Wsign-compare is cleaned up */
+#else
+extern bcmos_errno bcmbal_apiend_init_all(int argc, char *argv[], void *, int);
+extern bcmos_errno bcmbal_apiend_finish(void);
+#endif
+
 bcmbal_access_term_id access_term_id = DEFAULT_ATERM_ID;
 
 /********************************************************************\
@@ -43,7 +50,7 @@
     bcmos_errno err = BCM_ERR_OK;
     bcmbal_cb_cfg cb_cfg = {};
     uint16_t ind_subgroup;
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Subscription for other messages\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Subscription for other messages");
 
     cb_cfg.module = BCMOS_MODULE_ID_NONE;
 
@@ -193,13 +200,13 @@
     char *ip_and_port = NULL;
     if (NULL == bal_init)
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Recvied NULL balInit Structure from VOLTHA \n");
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Received NULL balInit Structure from VOLTHA");
        return BAL_ERRNO__BAL_ERR_PERM;
     }
     else
     {
        ip_and_port = bal_init->voltha_adapter_ip_port;
-       ASFVOLT_LOG(ASFVOLT_DEBUG,"\nRecevied Adapter IP and Port from VOLTHA is %s\n",ip_and_port);
+       ASFVOLT_LOG(ASFVOLT_DEBUG,"Received Adapter IP and Port from VOLTHA is %s",ip_and_port);
     }
     char *argv[6];
     /* Initialize BAL */
@@ -224,7 +231,7 @@
     {
         /* Let logger task have enough time to drain its message queue. */
         usleep(1000000);
-        ASFVOLT_LOG(ASFVOLT_ERROR, "failed to Initialize the BAL\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "failed to Initialize the BAL");
         return err;
     }
 #endif
@@ -247,7 +254,7 @@
 
     if (err)
     {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "failed to register call back functions to BAL\n");
+      ASFVOLT_LOG(ASFVOLT_ERROR, "failed to register call back functions to BAL");
     }
 
     return err;
@@ -327,7 +334,7 @@
        }
        default:
        {
-          ASFVOLT_LOG(ASFVOLT_ERROR, "Invalid objet type for configuration\n");
+          ASFVOLT_LOG(ASFVOLT_ERROR, "Invalid object type for configuration");
           err = BAL_ERRNO__BAL_ERR_INVALID_OP;
           break;
        }
@@ -350,7 +357,7 @@
 
     if(!key->hdr->has_obj_type)
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "object type is not present for clear\n");
+       ASFVOLT_LOG(ASFVOLT_ERROR, "object type is not present for clear");
        return BAL_ERRNO__BAL_ERR_INVALID_OP;
     }
 
@@ -396,7 +403,7 @@
        }*/
        default:
        {
-          ASFVOLT_LOG(ASFVOLT_ERROR, "Invalid objet type to handle clear\n");
+          ASFVOLT_LOG(ASFVOLT_ERROR, "Invalid object type to handle clear");
           err = BAL_ERRNO__BAL_ERR_INVALID_OP;
           break;
        }
@@ -420,7 +427,7 @@
 
     if(!key->hdr->has_obj_type)
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "object type is not present for get\n");
+       ASFVOLT_LOG(ASFVOLT_ERROR, "object type is not present for get");
        return BAL_ERRNO__BAL_ERR_INVALID_OP;
     }
 
@@ -467,7 +474,7 @@
        }
        default:
        {
-          ASFVOLT_LOG(ASFVOLT_ERROR, "Invalid objet type to handle Get\n");
+          ASFVOLT_LOG(ASFVOLT_ERROR, "Invalid object type to handle Get");
           err = BAL_ERRNO__BAL_ERR_INVALID_OP;
           break;
        }
diff --git a/src/asfvolt16_driver.h b/src/asfvolt16_driver.h
index ab24309..76c99e3 100755
--- a/src/asfvolt16_driver.h
+++ b/src/asfvolt16_driver.h
@@ -26,11 +26,13 @@
 #include "bal_errno.grpc-c.h"
 #include "bal.grpc-c.h"
 
-#include <stdio.h>
+#include <syslog.h>
 
-#define ASFVOLT_ERROR 1
-#define ASFVOLT_INFO  2
-#define ASFVOLT_DEBUG 3
+#define ASFVOLT_ERROR (LOG_ERR)
+#define ASFVOLT_INFO  (LOG_INFO)
+#define ASFVOLT_DEBUG (LOG_DEBUG)
+#define ASFVOLT_SYSLOG_NAME "volthad"  /* syslog service name */
+
 #define ASFVOLT_MAX_PKT_SIZE 500
 #define ASFVOLT_MAX_DEVICE_ID_SIZE 50
 #define MAX_CHAR_LENGTH  20
@@ -41,19 +43,38 @@
 
 typedef struct BalCoreIpInfo
 {
-   char bal_core_arg1[4]; 
-   char bal_core_ip_port[24]; 
-   char bal_core_arg2[4]; 
-   char bal_shared_lib_ip_port[24]; 
+   char bal_core_arg1[4];
+   char bal_core_ip_port[24];
+   char bal_core_arg2[4];
+   char bal_shared_lib_ip_port[24];
 }balCoreIpInfo;
 
+#if 0 /* change to 1 to enable function/line to stdout w/syslog message*/
+#include <stdio.h>
+
+#define ASFVOLT_SYSLOG_MODE (LOG_CONS | LOG_PID | LOG_NDELAY)
+#define DEBUG_LOG(format, args...) \
+    printf(ASFVOLT_SYSLOG_NAME ": %s:%d: ", __FILE__, __LINE__); \
+    printf(format, ## args); \
+    putchar('\n');
+#else
+#define ASFVOLT_SYSLOG_MODE (           LOG_PID | LOG_NDELAY)
+#define DEBUG_LOG(format, args...)
+#endif
+
 #define ASFVOLT_LOG(log_type, format, args...) \
    if(log_type) \
    {\
-      printf("File(%s): Line(%d): ", __FUNCTION__, __LINE__);\
-      printf(format, ## args);\
+      syslog(log_type, "%s:%d: " format, __FILE__, __LINE__, ##args);\
+      DEBUG_LOG(format, ## args);\
    }
 
+#define ASFVOLT_LOG_LOC(log_type, file, line, format, args...) \
+   if(log_type) \
+   {\
+      syslog(log_type, "%s:%d: " format, file, line, ##args);\
+      DEBUG_LOG(format, ## args);\
+   }
 
 #define ASFVOLT_CFG_PROP_SET(cfg, obj, param, pram_prst, param_val) \
    if(pram_prst)\
@@ -61,11 +82,16 @@
        BCMBAL_CFG_PROP_SET(&cfg, obj, param, param_val);\
    }
 
+#define ASFVOLT_HEX2LOG(prio, pFormat, pData, len) \
+   asfvolt_hexlog2(prio, __FILE__, __LINE__, pFormat, pData, len)
+
+
 /***************************************************************
 *                                                              *
 *              Function Declarations                           *
 *                                                              *
 ****************************************************************/
+extern void asfvolt_hexlog2(int prio, const char *_file_loc, int _file_line, const char *pFormat, void* pData, size_t len);
 extern uint32_t asfvolt16_bal_init(BalInit *bal_init, balCoreIpInfo *coreInfo);
 extern uint32_t asfvolt16_bal_finish(void);
 extern uint32_t bal_register_indication_cbs(void);
diff --git a/src/bal_access_terminal_hdlr.c b/src/bal_access_terminal_hdlr.c
index c05e5cf..cebd418 100755
--- a/src/bal_access_terminal_hdlr.c
+++ b/src/bal_access_terminal_hdlr.c
@@ -36,7 +36,7 @@
 
     key.access_term_id = access_term_cfg->key->access_term_id;
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Configuration of OLT starts\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Configuration of OLT starts");
 
     /* init the API struct */
     BCMBAL_CFG_INIT(&acc_term_obj, access_terminal, key);
@@ -48,11 +48,11 @@
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the access-terminal(OLT) to ADMIN-UP\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the access-terminal(OLT) to ADMIN-UP");
         return BAL_ERRNO__BAL_ERR_INTERNAL;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "Access Terminal UP configuration sent to OLT\n");
+    ASFVOLT_LOG(ASFVOLT_INFO, "Access Terminal UP configuration sent to OLT");
     return BAL_ERRNO__BAL_ERR_OK;
 }
 
@@ -65,10 +65,10 @@
 bcmos_errno bal_access_term_indication_cb(bcmbal_obj *obj)
 {
     /*bcmos_errno result = BCM_ERR_OK;*/
-    ASFVOLT_LOG(ASFVOLT_INFO, "Processing API \'%s\' IND callback (status is %s)\n",
+    ASFVOLT_LOG(ASFVOLT_INFO, "Processing API \'%s\' IND callback (status is %s)",
 		    bcmbal_objtype_str(obj->obj_type),
 		    bcmos_strerror(obj->status));
-    
+
     return BAL_ERRNO__BAL_ERR_OK;
 }
 
@@ -83,7 +83,7 @@
     bcmbal_access_terminal_cfg cfg_clear;         /**< declare main API struct */
     bcmbal_access_terminal_key key = { };   /**< declare key */
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "processing the clear request on access terminal\n");
+    ASFVOLT_LOG(ASFVOLT_INFO, "processing the clear request on access terminal");
 
     key.access_term_id = access_term_key->access_term_id;
 
@@ -96,11 +96,11 @@
 
     if( err != BCM_ERR_OK)
     {
-       ASFVOLT_LOG(ASFVOLT_INFO, "Failed to clear the access terminal\n");
+       ASFVOLT_LOG(ASFVOLT_INFO, "Failed to clear the access terminal");
        return BAL_ERRNO__BAL_ERR_INTERNAL;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "Successfully cleared the access terminal\n");
+    ASFVOLT_LOG(ASFVOLT_INFO, "Successfully cleared the access terminal");
     return BAL_ERRNO__BAL_ERR_OK;
 }
 
@@ -116,7 +116,7 @@
     bcmbal_access_terminal_cfg cfg;         /**< declare main API struct */
     bcmbal_access_terminal_key key = { };   /**< declare key */
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "processing the get request on access terminal\n");
+    ASFVOLT_LOG(ASFVOLT_INFO, "processing the get request on access terminal");
     /* init the API struct */
     BCMBAL_CFG_INIT(&cfg, access_terminal, key);
 
@@ -126,12 +126,12 @@
     err = bcmbal_cfg_get(DEFAULT_ATERM_ID, &cfg.hdr);
     if (err != BCM_ERR_OK)
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get access terminal configuration\n");
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get access terminal configuration");
        return BAL_ERRNO__BAL_ERR_INTERNAL;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, 
-                  "To-Do. Send access terminal details to Adapter\n");
-   
+    ASFVOLT_LOG(ASFVOLT_INFO,
+                  "To-Do. Send access terminal details to Adapter");
+
     return BAL_ERRNO__BAL_ERR_OK;
 }
diff --git a/src/bal_flow_hdlr.c b/src/bal_flow_hdlr.c
index 5a330b1..adaba1a 100755
--- a/src/bal_flow_hdlr.c
+++ b/src/bal_flow_hdlr.c
@@ -28,31 +28,31 @@
  * Description : copy queue information from proto structure to     *
  *               BAL structure                                      *
  ********************************************************************/
-static uint32_t bal_fill_queue_cfg(BalTmQueueRef       *tmp_que, 
+static uint32_t bal_fill_queue_cfg(BalTmQueueRef       *tmp_que,
                                    bcmbal_tm_queue_ref *que_val)
 {
    if(tmp_que->has_sched_id)
    {
-      que_val->sched_id = tmp_que->sched_id; 
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "que_val->sched_id = %d\n", que_val->sched_id);
+      que_val->sched_id = tmp_que->sched_id;
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "que_val->sched_id = %d", que_val->sched_id);
    }
 
    if(tmp_que->has_queue_id)
    {
       que_val->queue_id = tmp_que->queue_id;
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "que_val->queue_id = %d\n", que_val->queue_id);
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "que_val->queue_id = %d", que_val->queue_id);
    }
 
    return BAL_ERRNO__BAL_ERR_OK;
 }
-   
+
 
 /********************************************************************\
  * Function    : bal_fill_action_cfg                                *
  * Description : copy action information from proto structure to    *
  *               BAL structure                                      *
  ********************************************************************/
-static uint32_t bal_fill_action_cfg(BalAction     *tmp_action, 
+static uint32_t bal_fill_action_cfg(BalAction     *tmp_action,
                                     bcmbal_action *action_val)
 {
 
@@ -62,49 +62,49 @@
       if (action_val->presence_mask & BCMBAL_ACTION_ID_CMDS_BITMASK)
       {
          action_val->cmds_bitmask = tmp_action->cmds_bitmask;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->cmds_bitmask = %x\n", action_val->cmds_bitmask);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->cmds_bitmask = %x", action_val->cmds_bitmask);
       }
 
       if (action_val->presence_mask & BCMBAL_ACTION_ID_O_VID)
       {
          action_val->o_vid = tmp_action->o_vid;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->o_vid = %d\n",  action_val->o_vid);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->o_vid = %d",  action_val->o_vid);
       }
 
       if (action_val->presence_mask & BCMBAL_ACTION_ID_O_PBITS)
       {
          action_val->o_pbits = tmp_action->o_pbits;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->o_pbits = %d\n",  action_val->o_pbits);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->o_pbits = %d",  action_val->o_pbits);
       }
 
       if (action_val->presence_mask & BCMBAL_ACTION_ID_O_TPID)
       {
          action_val->o_tpid = tmp_action->o_tpid;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->o_tpid = %d\n",  action_val->o_tpid);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->o_tpid = %d",  action_val->o_tpid);
       }
 
       if (action_val->presence_mask & BCMBAL_ACTION_ID_I_VID)
       {
          action_val->i_vid = tmp_action->i_vid;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->i_vid = %d\n",  action_val->i_vid);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->i_vid = %d",  action_val->i_vid);
       }
 
       if (action_val->presence_mask & BCMBAL_ACTION_ID_I_PBITS)
       {
          action_val->i_pbits = tmp_action->i_pbits;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->i_pbits = %d\n",  action_val->i_pbits);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->i_pbits = %d",  action_val->i_pbits);
       }
 
       if (action_val->presence_mask & BCMBAL_ACTION_ID_I_TPID)
       {
          action_val->i_tpid = tmp_action->i_tpid;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->i_tpid = %d\n",  action_val->i_tpid);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->i_tpid = %d",  action_val->i_tpid);
       }
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->presence_mask = %x\n",  action_val->presence_mask);
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "action_val->presence_mask = %x",  action_val->presence_mask);
    }
    else
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Action is not present in the flow\n");
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Action is not present in the flow");
       return BAL_ERRNO__BAL_ERR_PARM;
    }
 
@@ -117,7 +117,7 @@
  * Description : copy classifier information from proto structure to*
  *               BAL structure
  ********************************************************************/
-uint32_t bal_fill_classifier_cfg(BalClassifier     *tmp_classifier, 
+uint32_t bal_fill_classifier_cfg(BalClassifier     *tmp_classifier,
                                         bcmbal_classifier *classifier_val)
 {
 
@@ -127,57 +127,57 @@
       if (classifier_val->presence_mask  & BCMBAL_CLASSIFIER_ID_O_TPID)
       {
          classifier_val->o_tpid = tmp_classifier->o_tpid;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->o_tpid = %d\n",  classifier_val->o_tpid);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->o_tpid = %d",  classifier_val->o_tpid);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_O_VID)
       {
          classifier_val->o_vid = tmp_classifier->o_vid;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->o_vid = %d\n",  classifier_val->o_vid);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->o_vid = %d",  classifier_val->o_vid);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_I_TPID)
       {
          classifier_val->i_tpid = tmp_classifier->i_tpid;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->i_tpid = %d\n",  classifier_val->i_tpid);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->i_tpid = %d",  classifier_val->i_tpid);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_I_VID)
       {
          classifier_val->i_vid = tmp_classifier->i_vid;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->i_vid = %d\n",  classifier_val->i_vid);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->i_vid = %d",  classifier_val->i_vid);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_O_PBITS)
       {
          classifier_val->o_pbits = tmp_classifier->o_pbits;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->o_pbits = %d\n",  classifier_val->o_pbits);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->o_pbits = %d",  classifier_val->o_pbits);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_I_PBITS)
       {
          classifier_val->i_pbits = tmp_classifier->i_pbits;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->i_pbits = %d\n",  classifier_val->i_pbits);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->i_pbits = %d",  classifier_val->i_pbits);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_ETHER_TYPE)
       {
          classifier_val->ether_type = tmp_classifier->ether_type;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->ether_type = %x\n",  classifier_val->ether_type);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->ether_type = %x",  classifier_val->ether_type);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_DST_MAC)
       {
          if(tmp_classifier->dst_mac.len > BCMOS_ETH_ALEN)
          {
-            memcpy(classifier_val->dst_mac.u8, 
+            memcpy(classifier_val->dst_mac.u8,
                    tmp_classifier->dst_mac.data, tmp_classifier->dst_mac.len);
-            /*ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->dst_mac= %d\n",  classifier_val->dst_mac);*/
+            /*ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->dst_mac= %d",  classifier_val->dst_mac);*/
          }
          else
          {
             ASFVOLT_LOG(ASFVOLT_ERROR, "dst_mac should not be more than 6 bytes."
-                                        "actual bytes %lud\n",  tmp_classifier->dst_mac.len);
+                                        "actual bytes %lu",  tmp_classifier->dst_mac.len);
             return BAL_ERRNO__BAL_ERR_PARM;
          }
       }
@@ -186,14 +186,14 @@
       {
          if(tmp_classifier->src_mac.len > BCMOS_ETH_ALEN)
          {
-            memcpy(classifier_val->src_mac.u8, 
+            memcpy(classifier_val->src_mac.u8,
                    tmp_classifier->src_mac.data, tmp_classifier->src_mac.len);
-            /*ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->src_mac= %x\n",  classifier_val->src_mac);*/
+            /*ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->src_mac= %x",  classifier_val->src_mac);*/
          }
          else
          {
             ASFVOLT_LOG(ASFVOLT_ERROR, "src_mac should not be more than 6 bytes."
-                                        "actual bytes %lud\n",  tmp_classifier->src_mac.len);
+                                        "actual bytes %lu",  tmp_classifier->src_mac.len);
             return BAL_ERRNO__BAL_ERR_PARM;
          }
 
@@ -202,44 +202,44 @@
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_IP_PROTO)
       {
          classifier_val->ip_proto  = tmp_classifier->ip_proto;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->ip_proto = %x\n",  classifier_val->ip_proto);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->ip_proto = %x",  classifier_val->ip_proto);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_DST_IP)
       {
          classifier_val->dst_ip.u32 = tmp_classifier->dst_ip;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->dst_ip = %x\n",  classifier_val->dst_ip.u32);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->dst_ip = %x",  classifier_val->dst_ip.u32);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_SRC_IP)
       {
          classifier_val->src_ip.u32 = tmp_classifier->src_ip;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->src_ip = %x\n",  classifier_val->src_ip.u32);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->src_ip = %x",  classifier_val->src_ip.u32);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_SRC_PORT)
       {
          classifier_val->src_port = tmp_classifier->src_port;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->src_port = %d\n",  classifier_val->src_port);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->src_port = %d",  classifier_val->src_port);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_DST_PORT)
       {
          classifier_val->dst_port = tmp_classifier->dst_port;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->dst_port = %d\n",  classifier_val->dst_port);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->dst_port = %d",  classifier_val->dst_port);
       }
 
       if (classifier_val->presence_mask & BCMBAL_CLASSIFIER_ID_PKT_TAG_TYPE)
       {
          classifier_val->pkt_tag_type = tmp_classifier->pkt_tag_type;
-         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->pkt_tag_type = %x\n",  classifier_val->pkt_tag_type);
+         ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->pkt_tag_type = %x",  classifier_val->pkt_tag_type);
       }
 
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->presence_mask = %x\n",  classifier_val->presence_mask);
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "classifier_val->presence_mask = %x",  classifier_val->presence_mask);
    }
    else
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Classifier is not present in the flow\n");
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Classifier is not present in the flow");
       return BAL_ERRNO__BAL_ERR_PARM;
    }
 
@@ -268,23 +268,23 @@
    }
    else
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Invalid Flow Id (%d)\n", flow_cfg->key->flow_id);
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Invalid Flow Id (%d)", flow_cfg->key->flow_id);
       return BAL_ERRNO__BAL_ERR_PARM;
    }
 
 
-   ASFVOLT_LOG(ASFVOLT_INFO, "Adding the flow to OLT. FlowID(%d)\n", flow_cfg->key->flow_id);
+   ASFVOLT_LOG(ASFVOLT_INFO, "Adding the flow to OLT. FlowID(%d)", flow_cfg->key->flow_id);
 
-   if (!flow_cfg->key->has_flow_type && 
-         ((flow_cfg->key->flow_type < BAL_FLOW_TYPE__BAL_FLOW_TYPE_UPSTREAM) || 
+   if (!flow_cfg->key->has_flow_type &&
+         ((flow_cfg->key->flow_type < BAL_FLOW_TYPE__BAL_FLOW_TYPE_UPSTREAM) ||
          flow_cfg->key->flow_type > BAL_FLOW_TYPE__BAL_FLOW_TYPE_MULTICAST ))
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Flow type is not supported (%d)\n", flow_cfg->key->flow_type);
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Flow type is not supported (%d)", flow_cfg->key->flow_type);
       return BAL_ERRNO__BAL_ERR_PARM;
    }
    else
    {
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "flow_type = %d\n",  flow_cfg->key->flow_type);
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "flow_type = %d",  flow_cfg->key->flow_type);
       key.flow_type = (bcmbal_flow_type) flow_cfg->key->flow_type;
    }
 
@@ -293,69 +293,69 @@
 
    /* decode API parameters from grpc-c */
    /* Admin State */
-   ASFVOLT_CFG_PROP_SET(cfg, flow, admin_state, 
-                        flow_cfg->data->has_admin_state, 
+   ASFVOLT_CFG_PROP_SET(cfg, flow, admin_state,
+                        flow_cfg->data->has_admin_state,
                         flow_cfg->data->admin_state);
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "admin state = %d\n",  flow_cfg->data->admin_state);
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "admin state = %d",  flow_cfg->data->admin_state);
 
    /* Operational status */
-   ASFVOLT_CFG_PROP_SET(cfg, flow, oper_status, 
-                        flow_cfg->data->has_oper_status, 
+   ASFVOLT_CFG_PROP_SET(cfg, flow, oper_status,
+                        flow_cfg->data->has_oper_status,
                         flow_cfg->data->oper_status);
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "Oper. status = %d\n",  flow_cfg->data->oper_status);
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "Oper. status = %d",  flow_cfg->data->oper_status);
 
    /* Access Side interface ID */
-   ASFVOLT_CFG_PROP_SET(cfg, flow, access_int_id, 
-                        BCMOS_TRUE, 
+   ASFVOLT_CFG_PROP_SET(cfg, flow, access_int_id,
+                        BCMOS_TRUE,
                         flow_cfg->data->access_int_id);
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "access_int_id = %d\n",  flow_cfg->data->access_int_id);
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "access_int_id = %d",  flow_cfg->data->access_int_id);
 
    /* Network interface ID */
-   ASFVOLT_CFG_PROP_SET(cfg, flow, network_int_id, 
+   ASFVOLT_CFG_PROP_SET(cfg, flow, network_int_id,
                         BCMOS_TRUE,
                         flow_cfg->data->network_int_id);
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "network_int_id = %d\n",  flow_cfg->data->network_int_id);
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "network_int_id = %d",  flow_cfg->data->network_int_id);
 
    /* ONU ID */
    if(BAL_FLOW_TYPE__BAL_FLOW_TYPE_MULTICAST != flow_cfg->key->flow_type)
    {
-      ASFVOLT_CFG_PROP_SET(cfg, flow, sub_term_id, 
-                           flow_cfg->data->has_sub_term_id, 
+      ASFVOLT_CFG_PROP_SET(cfg, flow, sub_term_id,
+                           flow_cfg->data->has_sub_term_id,
                            flow_cfg->data->sub_term_id);
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "sub_term_id = %d\n",  flow_cfg->data->sub_term_id);
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "sub_term_id = %d",  flow_cfg->data->sub_term_id);
    }
    else if (BAL_FLOW_TYPE__BAL_FLOW_TYPE_MULTICAST == flow_cfg->key->flow_type)
    {
       /* In case of Multicast the flow belongs to particular group */
-      ASFVOLT_CFG_PROP_SET(cfg, flow, group_id, 
-                            flow_cfg->data->has_group_id, 
+      ASFVOLT_CFG_PROP_SET(cfg, flow, group_id,
+                            flow_cfg->data->has_group_id,
                             flow_cfg->data->group_id);
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "group_id = %d\n",  flow_cfg->data->group_id);
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "group_id = %d",  flow_cfg->data->group_id);
    }
 
    /*Subscriber Terminal UNI index*/
-   ASFVOLT_CFG_PROP_SET(cfg, flow, sub_term_uni_idx, 
-                         flow_cfg->data->has_sub_term_uni_idx, 
+   ASFVOLT_CFG_PROP_SET(cfg, flow, sub_term_uni_idx,
+                         flow_cfg->data->has_sub_term_uni_idx,
                          flow_cfg->data->sub_term_uni_idx);
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "sub_term_uni_idx = %d\n",  flow_cfg->data->sub_term_uni_idx);
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "sub_term_uni_idx = %d",  flow_cfg->data->sub_term_uni_idx);
 
    /*Resolve MAC*/
-   ASFVOLT_CFG_PROP_SET(cfg, flow, resolve_mac, 
-                         flow_cfg->data->has_resolve_mac, 
+   ASFVOLT_CFG_PROP_SET(cfg, flow, resolve_mac,
+                         flow_cfg->data->has_resolve_mac,
                          flow_cfg->data->resolve_mac);
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "resolve_mac = %d\n",  flow_cfg->data->resolve_mac);
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "resolve_mac = %d",  flow_cfg->data->resolve_mac);
 
    /*Gem port*/
-   ASFVOLT_CFG_PROP_SET(cfg, flow, svc_port_id, 
-                         flow_cfg->data->has_svc_port_id, 
+   ASFVOLT_CFG_PROP_SET(cfg, flow, svc_port_id,
+                         flow_cfg->data->has_svc_port_id,
                          flow_cfg->data->svc_port_id);
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "svc_port_id = %d\n",  flow_cfg->data->svc_port_id);
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "svc_port_id = %d",  flow_cfg->data->svc_port_id);
 
    /*priority*/
-   ASFVOLT_CFG_PROP_SET(cfg, flow, priority, 
-                        flow_cfg->data->has_priority, 
+   ASFVOLT_CFG_PROP_SET(cfg, flow, priority,
+                        flow_cfg->data->has_priority,
                         flow_cfg->data->priority);
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "priority = %d\n",flow_cfg->data->priority);
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "priority = %d",flow_cfg->data->priority);
 
    BalClassifier *tmp_classifier = (BalClassifier*)(flow_cfg->data->classifier);
 
@@ -365,8 +365,8 @@
 
       if(bal_err != BAL_ERRNO__BAL_ERR_OK)
       {
-         ASFVOLT_LOG(ASFVOLT_ERROR, 
-               "Addition of flow %d failed while processing classifier\n",
+         ASFVOLT_LOG(ASFVOLT_ERROR,
+               "Addition of flow %d failed while processing classifier",
                flow_cfg->key->flow_id);
          return bal_err;
       }
@@ -375,7 +375,7 @@
    }
    else
    {
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "No Classifier for flow\n");
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "No Classifier for flow");
    }
 
    BalAction *tmp_action = (BalAction*)(flow_cfg->data->action);
@@ -386,8 +386,8 @@
 
       if(bal_err != BAL_ERRNO__BAL_ERR_OK)
       {
-         ASFVOLT_LOG(ASFVOLT_ERROR, 
-               "Addition of flow %d failed while processing action\n",
+         ASFVOLT_LOG(ASFVOLT_ERROR,
+               "Addition of flow %d failed while processing action",
                flow_cfg->key->flow_id);
          return bal_err;
       }
@@ -395,14 +395,14 @@
    }
    else
    {
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "No Action for flow\n");
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "No Action for flow");
    }
 
    /*cookie*/
-   ASFVOLT_CFG_PROP_SET(cfg, flow, cookie, 
-                        flow_cfg->data->has_cookie, 
+   ASFVOLT_CFG_PROP_SET(cfg, flow, cookie,
+                        flow_cfg->data->has_cookie,
                         flow_cfg->data->cookie);
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "priority = %lx\n",flow_cfg->data->cookie);
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "priority = %lx",flow_cfg->data->cookie);
 
    /*Egress queue*/
    BalTmQueueRef *tmp_que = (BalTmQueueRef*)(flow_cfg->data->queue);
@@ -413,8 +413,8 @@
 
       if(bal_err != BAL_ERRNO__BAL_ERR_OK)
       {
-         ASFVOLT_LOG(ASFVOLT_ERROR, 
-               "Addition of flow %d failed while processing queue\n",
+         ASFVOLT_LOG(ASFVOLT_ERROR,
+               "Addition of flow %d failed while processing queue",
                flow_cfg->key->flow_id);
          return bal_err;
       }
@@ -425,16 +425,16 @@
       ASFVOLT_LOG(ASFVOLT_DEBUG, "No queue Information for flow");
    }
    /*dba_tm_sched_id*/
-   ASFVOLT_CFG_PROP_SET(cfg, flow, dba_tm_sched_id, 
-                        flow_cfg->data->has_dba_tm_sched_id, 
+   ASFVOLT_CFG_PROP_SET(cfg, flow, dba_tm_sched_id,
+                        flow_cfg->data->has_dba_tm_sched_id,
                         flow_cfg->data->dba_tm_sched_id);
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "tm_sched used for dba = %d\n",flow_cfg->data->dba_tm_sched_id);
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "tm_sched used for dba = %d",flow_cfg->data->dba_tm_sched_id);
 
    err = bcmbal_cfg_set(DEFAULT_ATERM_ID, &cfg.hdr);
    if(err != BCM_ERR_OK)
    {
-        ASFVOLT_LOG(ASFVOLT_ERROR, 
-              "Failed to configure the flow. FlowId(%d)\n", key.flow_id);
+        ASFVOLT_LOG(ASFVOLT_ERROR,
+              "Failed to configure the flow. FlowId(%d)", key.flow_id);
         return BAL_ERRNO__BAL_ERR_INTERNAL;
    }
    return BAL_ERRNO__BAL_ERR_OK;
@@ -443,7 +443,7 @@
 
 /********************************************************************\
  * Function    : bal_flow_cfg_clear                                 *
- * Description : Deletes/Clears the OLT DEVICE with flow 
+ * Description : Deletes/Clears the OLT DEVICE with flow            *
  *               information using BAL Apis                         *
  ********************************************************************/
 uint32_t bal_flow_cfg_clear(BalFlowKey *flow_key)
@@ -459,13 +459,13 @@
    }
    else
    {
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "Invalid Flow Parameters to clear FlowId(%d), FlowType(%d)\n", 
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "Invalid Flow Parameters to clear FlowId(%d), FlowType(%d)",
                                   key.flow_id, key.flow_type);
       return BAL_ERRNO__BAL_ERR_PARM;
    }
 
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "FlowId(%d), FlowType(%d)\n", key.flow_id, key.flow_type);
- 
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "FlowId(%d), FlowType(%d)", key.flow_id, key.flow_type);
+
    /* init the API struct */
    BCMBAL_CFG_INIT(&cfg, flow, key);
 
@@ -473,13 +473,13 @@
    err = bcmbal_cfg_clear(DEFAULT_ATERM_ID, &cfg.hdr);
    if( err != BCM_ERR_OK)
    {
-      ASFVOLT_LOG(ASFVOLT_INFO, 
-          "Failed to clear the Flow. FlowID(%d) FlowType(%d)\n", 
+      ASFVOLT_LOG(ASFVOLT_INFO,
+          "Failed to clear the Flow. FlowID(%d) FlowType(%d)",
                   key.flow_id, key.flow_type);
       return BAL_ERRNO__BAL_ERR_INTERNAL;
    }
    return BAL_ERRNO__BAL_ERR_OK;
-} 
+}
 
 
 /********************************************************************\
@@ -500,7 +500,7 @@
    }
    else
    {
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "Invalid Flow Parameters to get cfg FlowId(%d), FlowType(%d)\n", 
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "Invalid Flow Parameters to get cfg FlowId(%d), FlowType(%d)",
                                   key.flow_id, key.flow_type);
       return BAL_ERRNO__BAL_ERR_PARM;
    }
@@ -514,14 +514,14 @@
    err = bcmbal_cfg_get(DEFAULT_ATERM_ID, &cfg.hdr);
    if( err != BCM_ERR_OK)
    {
-      ASFVOLT_LOG(ASFVOLT_INFO, 
-            "Failed to get Flow Info. FlowID(%d) FlowType(%d)\n", 
+      ASFVOLT_LOG(ASFVOLT_INFO,
+            "Failed to get Flow Info. FlowID(%d) FlowType(%d)",
             key.flow_id, key.flow_type);
       return BAL_ERRNO__BAL_ERR_INTERNAL;
    }
 
-   ASFVOLT_LOG(ASFVOLT_INFO, 
-                  "To-Do. Send Flow details to Adapter\n");
+   ASFVOLT_LOG(ASFVOLT_INFO,
+                  "To-Do. Send Flow details to Adapter");
 
    return BAL_ERRNO__BAL_ERR_OK;
-} 
+}
diff --git a/src/bal_group_hdlr.c b/src/bal_group_hdlr.c
index 5c05425..c00b1a3 100755
--- a/src/bal_group_hdlr.c
+++ b/src/bal_group_hdlr.c
@@ -42,11 +42,11 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the group cfg(OLT): Group Id was not present \n");
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the group cfg(OLT): Group Id was not present");
        return BAL_ERRNO__BAL_ERR_NOENT;
     }
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Configuration of OLT(group cfg) starts\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Configuration of OLT(group cfg) starts");
 
     /* init the API struct */
     BCMBAL_CFG_INIT(&grp_cfg_obj, group, key);
@@ -54,15 +54,15 @@
     /* decode API parameters from GRPC */
     if(tm_group_cfg->data->has_members_cmd)
     {
-        ASFVOLT_CFG_PROP_SET(grp_cfg_obj, group, members_cmd, 
-                             tm_group_cfg->data->has_members_cmd, 
+        ASFVOLT_CFG_PROP_SET(grp_cfg_obj, group, members_cmd,
+                             tm_group_cfg->data->has_members_cmd,
                              tm_group_cfg->data->members_cmd);
     }
 
     if(tm_group_cfg->data->has_cookie)
     {
-        ASFVOLT_CFG_PROP_SET(grp_cfg_obj, group, cookie, 
-                             tm_group_cfg->data->has_cookie, 
+        ASFVOLT_CFG_PROP_SET(grp_cfg_obj, group, cookie,
+                             tm_group_cfg->data->has_cookie,
                              tm_group_cfg->data->cookie);
     }
 
@@ -73,31 +73,31 @@
     valFlows.val = (bcmbal_flow_id *)malloc((valFlows.len)*sizeof(bcmbal_flow_id));
     if(!valFlows.val)
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the group cfg(OLT): Memory Exhausted\n");
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the group cfg(OLT): Memory Exhausted");
        return BAL_ERRNO__BAL_ERR_NOMEM;
     }
-    memcpy((void *)valFlows.val, (const void *)balFlows->val, 
+    memcpy((void *)valFlows.val, (const void *)balFlows->val,
            (balFlows->n_val)*sizeof(bcmbal_flow_id));
-    ASFVOLT_CFG_PROP_SET(grp_cfg_obj, group, flows, BCMOS_TRUE, valFlows); 
+    ASFVOLT_CFG_PROP_SET(grp_cfg_obj, group, flows, BCMOS_TRUE, valFlows);
 
     if(tm_group_cfg->data->has_owner)
     {
-        ASFVOLT_CFG_PROP_SET(grp_cfg_obj, group, owner, 
-                             tm_group_cfg->data->has_owner, 
+        ASFVOLT_CFG_PROP_SET(grp_cfg_obj, group, owner,
+                             tm_group_cfg->data->has_owner,
                              tm_group_cfg->data->owner);
     }
 
-    BalGroupMemberInfoList *balMembers = 
+    BalGroupMemberInfoList *balMembers =
               (BalGroupMemberInfoList *)tm_group_cfg->data->members;
     bcmbal_group_member_info_list_u16 valMembers = {};
     /*if(balMembers->has_len)*/
     {
        valMembers.len = balMembers->n_val;
-       valMembers.val = 
+       valMembers.val =
         (bcmbal_group_member_info *)malloc((valMembers.len)*sizeof(bcmbal_group_member_info));
        if(!valMembers.val)
        {
-          ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the group cfg(OLT): Memory Exhausted\n");
+          ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the group cfg(OLT): Memory Exhausted");
           return BAL_ERRNO__BAL_ERR_NOMEM;
        }
        //check
@@ -106,17 +106,17 @@
        {
           if(balMembers->val[grp_mem_idx]->has_intf_id)
           {
-             valMembers.val[grp_mem_idx].intf_id 
+             valMembers.val[grp_mem_idx].intf_id
                                   = balMembers->val[grp_mem_idx]->intf_id;
           }
           if(balMembers->val[grp_mem_idx]->has_svc_port_id)
           {
-             valMembers.val[grp_mem_idx].svc_port_id 
+             valMembers.val[grp_mem_idx].svc_port_id
                                = balMembers->val[grp_mem_idx]->svc_port_id;
           }
           if(balMembers->val[grp_mem_idx]->action->has_presence_mask)
           {
-             valMembers.val[grp_mem_idx].action.presence_mask 
+             valMembers.val[grp_mem_idx].action.presence_mask
                      = balMembers->val[grp_mem_idx]->action->presence_mask;
           }
           if(balMembers->val[grp_mem_idx]->action->has_cmds_bitmask)
@@ -165,18 +165,18 @@
                      = balMembers->val[grp_mem_idx]->queue->queue_id;
           }
        }
-       ASFVOLT_CFG_PROP_SET(grp_cfg_obj, group, members, BCMOS_TRUE, valMembers); 
+       ASFVOLT_CFG_PROP_SET(grp_cfg_obj, group, members, BCMOS_TRUE, valMembers);
     }
 
     err = bcmbal_cfg_set(DEFAULT_ATERM_ID, &(grp_cfg_obj.hdr));
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the group cfg(OLT)\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the group cfg(OLT)");
         return err;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "\nSet Group configuration sent to OLT for Group Id(%d)\n", 
+    ASFVOLT_LOG(ASFVOLT_INFO, "Set Group configuration sent to OLT for Group Id(%d)",
                                key.group_id);
     return err;
 }
@@ -187,7 +187,7 @@
  * Description : get the OLT device group cfg                    *
  ********************************************************************/
 
-uint32_t bal_group_cfg_get(BalGroupKey *tm_group_cfg_key, 
+uint32_t bal_group_cfg_get(BalGroupKey *tm_group_cfg_key,
                            BalGroupCfg *tm_group_cfg)
 {
     bcmos_errno err = BCM_ERR_OK;
@@ -200,11 +200,11 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the group cfg(OLT): Group Id was not present\n");
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the group cfg(OLT): Group Id was not present");
        return BAL_ERRNO__BAL_ERR_NOENT;
     }
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Get group cfg(for OLT) starts\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Get group cfg(for OLT) starts");
 
     /* init the API struct */
     BCMBAL_CFG_INIT(&grp_cfg_obj, group, key);
@@ -216,11 +216,11 @@
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the group Cfg(OLT)\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the group Cfg(OLT)");
         return err;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "\nGet Group cfg sent to OLT for Group Id(%d)\n", 
+    ASFVOLT_LOG(ASFVOLT_INFO, "Get Group cfg sent to OLT for Group Id(%d)",
                                key.group_id);
     return err;
 }
@@ -242,11 +242,11 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the group cfg(OLT): Group Id was not present\n");
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the group cfg(OLT): Group Id was not present");
        return BAL_ERRNO__BAL_ERR_NOENT;
     }
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Clearing of OLT(group cfg) starts\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Clearing of OLT(group cfg) starts");
 
     /* init the API struct */
     BCMBAL_CFG_INIT(&grp_cfg_obj, group, key);
@@ -255,11 +255,11 @@
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the group Cfg(OLT)\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the group Cfg(OLT)");
         return err;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "\nClear Group cfg clear sent to OLT for Group Id(%d) \n", 
+    ASFVOLT_LOG(ASFVOLT_INFO, "Clear Group cfg clear sent to OLT for Group Id(%d)",
                                key.group_id);
     return err;
 }
@@ -272,11 +272,9 @@
 bcmos_errno bal_group_cfg_indication_cb(bcmbal_obj *obj)
 {
     bcmos_errno result = BCM_ERR_OK;
-    ASFVOLT_LOG(ASFVOLT_INFO, "Processing API ('%s)\n' IND callback status is (%s)\n",
+    ASFVOLT_LOG(ASFVOLT_INFO, "Processing API ('%s)' IND callback status is (%s)",
 		    bcmbal_objtype_str(obj->obj_type),
 		    bcmos_strerror(obj->status));
-    
+
     return result;
 }
-
-
diff --git a/src/bal_indications_hdlr.c b/src/bal_indications_hdlr.c
index 8066d18..312c5a6 100755
--- a/src/bal_indications_hdlr.c
+++ b/src/bal_indications_hdlr.c
@@ -36,13 +36,13 @@
    if(BCMBAL_OBJ_ID_ACCESS_TERMINAL != obj->obj_type ||
       bcmbal_access_terminal_auto_id_ind != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
    else
    {
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       BalIndications *balIndCfg;
       balIndCfg = malloc(sizeof(BalIndications));
@@ -165,7 +165,7 @@
    if(BCMBAL_OBJ_ID_ACCESS_TERMINAL != obj->obj_type ||
       bcmbal_access_terminal_auto_id_oper_status_change != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -245,7 +245,7 @@
    if(BCMBAL_OBJ_ID_FLOW != obj->obj_type ||
       bcmbal_flow_auto_id_oper_status_change != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -330,7 +330,7 @@
    if(BCMBAL_OBJ_ID_FLOW != obj->obj_type ||
       bcmbal_flow_auto_id_ind != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -496,7 +496,7 @@
    if(BCMBAL_OBJ_ID_GROUP != obj->obj_type ||
       bcmbal_group_auto_id_ind != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -643,7 +643,7 @@
    if(BCMBAL_OBJ_ID_INTERFACE != obj->obj_type ||
       bcmbal_interface_auto_id_oper_status_change != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -723,7 +723,7 @@
    if(BCMBAL_OBJ_ID_INTERFACE != obj->obj_type ||
       bcmbal_interface_auto_id_los != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -799,7 +799,7 @@
    if(BCMBAL_OBJ_ID_INTERFACE != obj->obj_type ||
       bcmbal_interface_auto_id_ind != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -904,7 +904,7 @@
    if(BCMBAL_OBJ_ID_SUBSCRIBER_TERMINAL != obj->obj_type ||
       bcmbal_subscriber_terminal_auto_id_oper_status_change != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -987,13 +987,13 @@
    if(BCMBAL_OBJ_ID_SUBSCRIBER_TERMINAL != obj->obj_type ||
       bcmbal_subscriber_terminal_auto_id_sub_term_disc != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
    else
    {
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       BalIndications *balIndCfg;
       balIndCfg = malloc(sizeof(BalIndications));
@@ -1045,23 +1045,19 @@
 
       balIndCfg->terminal_disc->data->serial_number = serial_number;
 
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "Discovered ONU serial number "
-                "%2X%2X%2X%2X%1X%1X%1X%1X%1X%1X%1X%1X ",
+      ASFVOLT_LOG(ASFVOLT_INFO, "Discovered ONU serial number "
+                "%c%c%c%c%02X%02X%02X%02X",
                 sub_disc_ind->data.serial_number.vendor_id[0],
                 sub_disc_ind->data.serial_number.vendor_id[1],
                 sub_disc_ind->data.serial_number.vendor_id[2],
                 sub_disc_ind->data.serial_number.vendor_id[3],
-                sub_disc_ind->data.serial_number.vendor_specific[0]>>4 & 0x0f,
-                sub_disc_ind->data.serial_number.vendor_specific[0] & 0x0f,
-                sub_disc_ind->data.serial_number.vendor_specific[1]>>4 & 0x0f,
-                sub_disc_ind->data.serial_number.vendor_specific[1] & 0x0f,
-                sub_disc_ind->data.serial_number.vendor_specific[2]>>4 & 0x0f,
-                sub_disc_ind->data.serial_number.vendor_specific[2] & 0x0f,
-                sub_disc_ind->data.serial_number.vendor_specific[3]>>4 & 0x0f,
-                sub_disc_ind->data.serial_number.vendor_specific[3] & 0x0f);
+                sub_disc_ind->data.serial_number.vendor_specific[0],
+                sub_disc_ind->data.serial_number.vendor_specific[1],
+                sub_disc_ind->data.serial_number.vendor_specific[2],
+                sub_disc_ind->data.serial_number.vendor_specific[3]);
 
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "ONU Discovery:Before decoding:Vendor id is %s\n", sub_disc_ind->data.serial_number.vendor_id);
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "ONU Discovery:Before decoding:Vendor specific is %s\n", sub_disc_ind->data.serial_number.vendor_specific);
+      //ASFVOLT_LOG(ASFVOLT_DEBUG, "ONU Discovery:Before decoding:Vendor id is %s", sub_disc_ind->data.serial_number.vendor_id);
+      //ASFVOLT_LOG(ASFVOLT_DEBUG, "ONU Discovery:Before decoding:Vendor specific is %s", sub_disc_ind->data.serial_number.vendor_specific);
 
       char *vendor_id = malloc(sizeof(char)*MAX_CHAR_LENGTH);
       memset(vendor_id, 0, MAX_CHAR_LENGTH);
@@ -1071,7 +1067,7 @@
 		      sub_disc_ind->data.serial_number.vendor_id[2],
 		      sub_disc_ind->data.serial_number.vendor_id[3]);
       balIndCfg->terminal_disc->data->serial_number->vendor_id = vendor_id;
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "ONU Discovery:After decoding:Vendor id is %s\n", balIndCfg->terminal_disc->data->serial_number->vendor_id);
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "ONU Discovery:After decoding:Vendor id is %s", balIndCfg->terminal_disc->data->serial_number->vendor_id);
       char *vendor_specific = malloc(sizeof(char)*MAX_CHAR_LENGTH);
       memset(vendor_specific, 0, MAX_CHAR_LENGTH);
       sprintf(vendor_specific,"%1X%1X%1X%1X%1X%1X%1X%1X",
@@ -1084,7 +1080,7 @@
 		      sub_disc_ind->data.serial_number.vendor_specific[3]>>4 & 0x0f,
 		      sub_disc_ind->data.serial_number.vendor_specific[3] & 0x0f);
       balIndCfg->terminal_disc->data->serial_number->vendor_specific = vendor_specific;
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "ONU Discovery:After decoding:Vendor specific is %s\n", balIndCfg->terminal_disc->data->serial_number->vendor_specific);
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "ONU Discovery:After decoding:Vendor specific is %s", balIndCfg->terminal_disc->data->serial_number->vendor_specific);
 
       list_node *bal_indication_node = malloc(sizeof(list_node));
       bal_indication_node->bal_indication = balIndCfg;
@@ -1110,7 +1106,7 @@
    if(BCMBAL_OBJ_ID_SUBSCRIBER_TERMINAL != obj->obj_type ||
       bcmbal_subscriber_terminal_auto_id_sub_term_alarm != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -1198,7 +1194,7 @@
    if(BCMBAL_OBJ_ID_SUBSCRIBER_TERMINAL != obj->obj_type ||
       bcmbal_subscriber_terminal_auto_id_dgi != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -1274,7 +1270,7 @@
    if(BCMBAL_OBJ_ID_SUBSCRIBER_TERMINAL != obj->obj_type ||
       bcmbal_subscriber_terminal_auto_id_ind != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -1359,8 +1355,8 @@
       bal_serial_number__init(serialNum);
       balIndCfg->terminal_ind->data->serial_number = serialNum;
 
-      ASFVOLT_LOG(ASFVOLT_ERROR, "ONU Activation:Before decoding:Vendor id is %s\n", sub_ind->data.serial_number.vendor_id);
-      ASFVOLT_LOG(ASFVOLT_ERROR, "ONU Activation:Before decoding:Vendor specific is %s\n", sub_ind->data.serial_number.vendor_specific);
+      //ASFVOLT_LOG(ASFVOLT_ERROR, "ONU Activation:Before decoding:Vendor id is %s", sub_ind->data.serial_number.vendor_id);
+      //ASFVOLT_LOG(ASFVOLT_ERROR, "ONU Activation:Before decoding:Vendor specific is %s", sub_ind->data.serial_number.vendor_specific);
 
       char *vendor_id = malloc(sizeof(char)*MAX_CHAR_LENGTH);
       memset(vendor_id, 0, MAX_CHAR_LENGTH);
@@ -1370,7 +1366,7 @@
 		      sub_ind->data.serial_number.vendor_id[2],
 		      sub_ind->data.serial_number.vendor_id[3]);
       balIndCfg->terminal_ind->data->serial_number->vendor_id = vendor_id;
-      ASFVOLT_LOG(ASFVOLT_ERROR, "ONU Activation:After decoding:Vendor id is %s\n", balIndCfg->terminal_ind->data->serial_number->vendor_id);
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "ONU Activation:After decoding:Vendor id is %s", balIndCfg->terminal_ind->data->serial_number->vendor_id);
       char *vendor_specific = malloc(sizeof(char)*MAX_CHAR_LENGTH);
       memset(vendor_specific, 0, MAX_CHAR_LENGTH);
       sprintf(vendor_specific,"%1X%1X%1X%1X%1X%1X%1X%1X",
@@ -1383,7 +1379,7 @@
 		      sub_ind->data.serial_number.vendor_specific[3]>>4 & 0x0f,
 		      sub_ind->data.serial_number.vendor_specific[3] & 0x0f);
       balIndCfg->terminal_ind->data->serial_number->vendor_specific = vendor_specific;
-      ASFVOLT_LOG(ASFVOLT_ERROR, "ONU Activation:After decoding:Vendor specific is %s\n", balIndCfg->terminal_ind->data->serial_number->vendor_specific);
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "ONU Activation:After decoding:Vendor specific is %s", balIndCfg->terminal_ind->data->serial_number->vendor_specific);
 
       BalIdList *balAggportList;
       balAggportList = malloc(sizeof(BalIdList));
@@ -1440,7 +1436,7 @@
    if(BCMBAL_OBJ_ID_TM_QUEUE != obj->obj_type ||
       bcmbal_tm_queue_auto_id_ind != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -1617,7 +1613,7 @@
    if(BCMBAL_OBJ_ID_TM_SCHED != obj->obj_type ||
       bcmbal_tm_sched_auto_id_ind != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -1684,7 +1680,7 @@
    if(BCMBAL_OBJ_ID_PACKET != obj->obj_type ||
       bcmbal_packet_auto_id_bearer_channel_rx != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
@@ -1847,13 +1843,13 @@
    if(BCMBAL_OBJ_ID_PACKET != obj->obj_type ||
       bcmbal_packet_auto_id_itu_omci_channel_rx != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
    else
    {
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "Received OMCI response via BAL APIs\n");
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "Received OMCI response via BAL APIs");
       BalIndications *balIndCfg;
       balIndCfg = malloc(sizeof(BalIndications));
       memset(balIndCfg, 0, sizeof(BalIndications));
@@ -1928,7 +1924,7 @@
                                                                             BAL_GRPC_PRES;
             balIndCfg->balomciresp->key->packet_send_dest->itu_omci_channel->intf_id =
                                  omci_channel->key.packet_send_dest.u.itu_omci_channel.intf_id;
-            ASFVOLT_LOG(ASFVOLT_DEBUG, "OMCI Response for ONU id %d\n",
+            ASFVOLT_LOG(ASFVOLT_DEBUG, "OMCI Response for ONU id %d",
                  balIndCfg->balomciresp->key->packet_send_dest->itu_omci_channel->sub_term_id);
          }
          break;
@@ -1939,15 +1935,12 @@
          break;
       }
 
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "OMCI Response with %zd bytes is \n",balIndCfg->balomciresp->data->pkt.len);
-      uint16_t idx;
-      for(idx=0; idx<balIndCfg->balomciresp->data->pkt.len; idx++)
-      {
-	      printf("%02x", balIndCfg->balomciresp->data->pkt.data[idx]);
-      }
-      printf("\n");
-      ASFVOLT_LOG(ASFVOLT_DEBUG, "OMCI Response for ONU id %d\n",
+      ASFVOLT_HEX2LOG(ASFVOLT_DEBUG, "OMCI Response with %zd bytes is ",
+         balIndCfg->balomciresp->data->pkt.data, balIndCfg->balomciresp->data->pkt.len);
+
+      ASFVOLT_LOG(ASFVOLT_DEBUG, "OMCI Response for ONU id %d",
 		      balIndCfg->balomciresp->key->packet_send_dest->itu_omci_channel->sub_term_id);
+
       list_node *bal_indication_node = malloc(sizeof(list_node));
       bal_indication_node->bal_indication = balIndCfg;
 
@@ -1972,7 +1965,7 @@
    if(BCMBAL_OBJ_ID_PACKET != obj->obj_type ||
       bcmbal_packet_auto_id_ieee_oam_channel_rx != obj->subgroup)
    {
-      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API \'%s\' IND callback (status is %s)\n",
+      ASFVOLT_LOG(ASFVOLT_ERROR, "Processing BAL API '%s' IND callback (status is %s)",
 				  bcmbal_objtype_str(obj->obj_type), bcmos_strerror(obj->status));
       result = BCM_ERR_INTERNAL;
    }
diff --git a/src/bal_interface_hdlr.c b/src/bal_interface_hdlr.c
index 33847ea..707f3fd 100755
--- a/src/bal_interface_hdlr.c
+++ b/src/bal_interface_hdlr.c
@@ -23,7 +23,7 @@
 #include "bal_interface_hdlr.h"
 
 /********************************************************************\
- * Function    : bal_interface_cfg_set                          *
+ * Function    : bal_interface_cfg_set                              *
  * Description : Configures the PON and NNI interfaces              *
  *               of OLT Device                                      *
  ********************************************************************/
@@ -49,51 +49,51 @@
         BCMBAL_CFG_INIT(&interface_obj, interface, intf_key);
 
         ASFVOLT_CFG_PROP_SET(interface_obj, interface, admin_state, BCMOS_TRUE, BCMBAL_STATE_UP);
-         
-        ASFVOLT_CFG_PROP_SET(interface_obj, interface, min_data_agg_port_id, 
-                               interface_cfg->data->has_min_data_svc_port_id, 
+
+        ASFVOLT_CFG_PROP_SET(interface_obj, interface, min_data_agg_port_id,
+                               interface_cfg->data->has_min_data_svc_port_id,
                                interface_cfg->data->min_data_agg_port_id);
 
-        ASFVOLT_CFG_PROP_SET(interface_obj, interface, min_data_svc_port_id, 
-                               interface_cfg->data->has_min_data_svc_port_id, 
+        ASFVOLT_CFG_PROP_SET(interface_obj, interface, min_data_svc_port_id,
+                               interface_cfg->data->has_min_data_svc_port_id,
                                interface_cfg->data->min_data_svc_port_id);
 
         ASFVOLT_CFG_PROP_SET(interface_obj, interface, transceiver_type,
-                               BCMOS_TRUE, 
+                               BCMOS_TRUE,
                                interface_cfg->data->transceiver_type);
-        ASFVOLT_LOG(ASFVOLT_INFO, "Setting transceiver_type to : %d\n", interface_cfg->data->transceiver_type);
+        ASFVOLT_LOG(ASFVOLT_INFO, "Setting transceiver_type to : %d", interface_cfg->data->transceiver_type);
 
         ASFVOLT_CFG_PROP_SET(interface_obj, interface, ds_miss_mode,
-                               interface_cfg->data->has_ds_miss_mode, 
+                               interface_cfg->data->has_ds_miss_mode,
                                interface_cfg->data->ds_miss_mode);
 
         ASFVOLT_CFG_PROP_SET(interface_obj, interface, mtu,
-                               interface_cfg->data->has_mtu, 
+                               interface_cfg->data->has_mtu,
                                interface_cfg->data->mtu);
 
         ASFVOLT_CFG_PROP_SET(interface_obj, interface, flow_control,
-                               interface_cfg->data->has_flow_control, 
+                               interface_cfg->data->has_flow_control,
                                interface_cfg->data->flow_control);
 
         ASFVOLT_CFG_PROP_SET(interface_obj, interface, ds_tm,
-                               interface_cfg->data->has_ds_tm, 
+                               interface_cfg->data->has_ds_tm,
                                interface_cfg->data->ds_tm);
 
         ASFVOLT_CFG_PROP_SET(interface_obj, interface, us_tm,
-                               interface_cfg->data->has_us_tm, 
+                               interface_cfg->data->has_us_tm,
                                interface_cfg->data->us_tm);
 
-        ASFVOLT_LOG(ASFVOLT_INFO, "Bringing up the interface No: %d\n", intf_key.intf_id);
+        ASFVOLT_LOG(ASFVOLT_INFO, "Bringing up the interface No: %d", intf_key.intf_id);
 
         err = bcmbal_cfg_set(DEFAULT_ATERM_ID, &(interface_obj.hdr));
 
         if(BCM_ERR_OK != err)
         {
-            ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the interface object to ADMIN-UP\n");
+            ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the interface object to ADMIN-UP");
             return BAL_ERRNO__BAL_ERR_INTERNAL;
         }
     }
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "\n Set Interface configuration sent to OLT.Interface ID(%d) Interface Type(%d)\n", 
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Set Interface configuration sent to OLT.Interface ID(%d) Interface Type(%d)",
                                 intf_key.intf_id, intf_key.intf_type);
     return BAL_ERRNO__BAL_ERR_OK;
 }
@@ -104,13 +104,13 @@
  * Description : get the PON and NNI interfaces                     *
  *               of OLT Device                                      *
  ********************************************************************/
-uint32_t bal_interface_cfg_get(BalInterfaceKey *interface_cfg_key, 
+uint32_t bal_interface_cfg_get(BalInterfaceKey *interface_cfg_key,
                                BalInterfaceCfg *interface_cfg)
 {
     bcmos_errno err = BCM_ERR_OK;
     bcmbal_interface_cfg interface_obj;
     bcmbal_interface_key intf_key;
-    
+
     if((interface_cfg_key->has_intf_id) && (interface_cfg_key->has_intf_type))
     {
        intf_key.intf_id = interface_cfg_key->intf_id;
@@ -118,18 +118,18 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the interface cfg(OLT): Missing Key values\
-                                   Recevied key values intf-id(%d), intf-type(%d) \n", 
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the interface cfg(OLT): Missing Key values "
+                                  "Received key values intf-id(%d), intf-type(%d)",
                                    interface_cfg_key->intf_id, interface_cfg_key->intf_type);
        return BAL_ERRNO__BAL_ERR_NOENT;
     }
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Get interface cfg(for OLT) starts\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Get interface cfg(for OLT) starts");
     /*
      * Set the key in the interface object and initialize the object itself
      */
     BCMBAL_CFG_INIT(&interface_obj, interface, intf_key);
- 
+
     /* request all properties, include everything */
     BCMBAL_CFG_PROP_GET(&interface_obj, interface, all_properties);
 
@@ -137,12 +137,12 @@
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the interface Cfg(OLT)\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the interface Cfg(OLT)");
         return BAL_ERRNO__BAL_ERR_INTERNAL;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "\nGet Interface cfg sent to OLT. \
-                               Interface ID(%d) Interface Type(%d)\n", 
+    ASFVOLT_LOG(ASFVOLT_INFO, "Get Interface cfg sent to OLT. "
+                              "Interface ID(%d) Interface Type(%d)",
                                intf_key.intf_id, intf_key.intf_type);
     /* TODO - Add code to call grpc */
 
@@ -160,7 +160,7 @@
     bcmos_errno err = BCM_ERR_OK;
     bcmbal_interface_cfg interface_obj;
     bcmbal_interface_key intf_key;
-    
+
     if((interface_cfg_key->has_intf_id) && (interface_cfg_key->has_intf_type))
     {
        intf_key.intf_id = interface_cfg_key->intf_id;
@@ -168,14 +168,14 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the interface cfg(OLT): Missing Key values\
-                                   Recevied key values intf-id(%d), intf-type(%d) \n", 
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the interface cfg(OLT): Missing Key values "
+                                  "Received key values intf-id(%d), intf-type(%d)",
                                    interface_cfg_key->intf_id, interface_cfg_key->intf_type);
        return BAL_ERRNO__BAL_ERR_NOENT;
     }
 
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Clearing of OLT(interface cfg) starts\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Clearing of OLT(interface cfg) starts");
     /*
      * Set the key in the interface object and initialize the object itself
      */
@@ -185,12 +185,12 @@
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the interface Cfg(OLT)\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the interface Cfg(OLT)");
         return BAL_ERRNO__BAL_ERR_INTERNAL;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "\nClear Interface cfg sent to OLT. \
-                               Interface ID(%d) Interface Type(%d)\n", 
+    ASFVOLT_LOG(ASFVOLT_INFO, "Clear Interface cfg sent to OLT. "
+                              "Interface ID(%d) Interface Type(%d)",
                                intf_key.intf_id, intf_key.intf_type);
     return BAL_ERRNO__BAL_ERR_OK;
 }
diff --git a/src/bal_packet_hdlr.c b/src/bal_packet_hdlr.c
index 5f01c1d..74312c9 100755
--- a/src/bal_packet_hdlr.c
+++ b/src/bal_packet_hdlr.c
@@ -53,7 +53,7 @@
             buf.len = packet->data->pkt.len;
             buf.val = (uint8_t *)malloc((buf.len)*sizeof(uint8_t));
             memcpy(buf.val,(uint8_t *)packet->data->pkt.data,buf.len);
-	    ASFVOLT_LOG(ASFVOLT_DEBUG, "\n Packet of length %d bytes with dest type as %d\n",buf.len,packet->key->packet_send_dest->type);
+	    ASFVOLT_LOG(ASFVOLT_DEBUG, "Packet of length %d bytes with dest type as %d",buf.len,packet->key->packet_send_dest->type);
             err = bcmbal_pkt_send(aterm_id,
                   proxy_pkt_dest,
                   (const char *)(buf.val),
@@ -69,7 +69,7 @@
             buf.len = packet->data->pkt.len;
             buf.val = (uint8_t *)malloc((buf.len)*sizeof(uint8_t));
             memcpy(buf.val,(uint8_t *)packet->data->pkt.data,buf.len);
-	    ASFVOLT_LOG(ASFVOLT_DEBUG, "\n Packet of length %d bytes with dest type as %d\n",buf.len,packet->key->packet_send_dest->type);
+	    ASFVOLT_LOG(ASFVOLT_DEBUG, "Packet of length %d bytes with dest type as %d",buf.len,packet->key->packet_send_dest->type);
             err = bcmbal_pkt_send(aterm_id,
                   proxy_pkt_dest,
                   (const char *)(buf.val),
@@ -84,7 +84,7 @@
                .u.svc_port.intf_id = packet->key->packet_send_dest->svc_port->intf_id };
             buf.len = packet->data->pkt.len;
             buf.val = (uint8_t *)malloc((buf.len)*sizeof(uint8_t));
-	    ASFVOLT_LOG(ASFVOLT_DEBUG, "\n Packet of length %d bytes with dest type as %d\n",buf.len,packet->key->packet_send_dest->type);
+	    ASFVOLT_LOG(ASFVOLT_DEBUG, "Packet of length %d bytes with dest type as %d",buf.len,packet->key->packet_send_dest->type);
             memcpy(buf.val,(uint8_t *)packet->data->pkt.data,buf.len);
             err = bcmbal_pkt_send(aterm_id,
                   proxy_pkt_dest,
@@ -107,7 +107,7 @@
             char str1[MAX_CHAR_LENGTH];
             char str2[MAX_CHAR_LENGTH];
             memset(&arraySend,0,buf.len);
-            ASFVOLT_LOG(ASFVOLT_DEBUG,"\nSending omci msg to ONU of length is %d\n",buf.len);
+            ASFVOLT_LOG(ASFVOLT_DEBUG,"Sending omci msg to ONU of length is %d",buf.len);
             for(idx1=0,idx2=0; idx1<((buf.len)*2); idx1++,idx2++)
             {
                sprintf(str1,"%c",packet->data->pkt.data[idx1]);
@@ -117,17 +117,12 @@
             }
             buf.val = (uint8_t *)malloc((buf.len)*sizeof(uint8_t));
             memcpy(buf.val,(uint8_t *)arraySend,buf.len);
-            ASFVOLT_LOG(ASFVOLT_DEBUG,"\nAfter converting it into hex ");
-            for(idx2=0; idx2<buf.len; idx2++)
-            {
-               printf("%02x", buf.val[idx2]);
-            }
-            printf("\n");
+            ASFVOLT_HEX2LOG(ASFVOLT_DEBUG, "After converting %zd bytes to hex ", buf.val, buf.len);
             err = bcmbal_pkt_send(aterm_id,
                   proxy_pkt_dest,
                   (const char *)(buf.val),
                   buf.len);
-            ASFVOLT_LOG(ASFVOLT_DEBUG, "\n OMCI request msg of length(%d) sent to ONU(%d) through PON(%d)\n",
+            ASFVOLT_LOG(ASFVOLT_DEBUG, "OMCI request msg of length(%d) sent to ONU(%d) through PON(%d)",
                   buf.len,
                   packet->key->packet_send_dest->itu_omci_channel->sub_term_id,
                   packet->key->packet_send_dest->itu_omci_channel->intf_id);
@@ -136,12 +131,12 @@
          break;
       case BAL_DEST_TYPE__BAL_DEST_TYPE_IEEE_OAM_CHANNEL:
          {
-            ASFVOLT_LOG(ASFVOLT_DEBUG, "\n PLOAM msg not yet implemented\n");
+            ASFVOLT_LOG(ASFVOLT_DEBUG, "PLOAM msg not yet implemented");
          }
          break;
       default:
          {
-            ASFVOLT_LOG(ASFVOLT_DEBUG, "\n Invalid dest type\n");
+            ASFVOLT_LOG(ASFVOLT_DEBUG, "Invalid dest type");
          }
          break;
    }
diff --git a/src/bal_stats_hdlr.c b/src/bal_stats_hdlr.c
index 6c20e44..7865c7c 100755
--- a/src/bal_stats_hdlr.c
+++ b/src/bal_stats_hdlr.c
@@ -31,7 +31,7 @@
 
    bcmos_errno err = BCM_ERR_OK;
 
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "Get Stats from OLT intf_type %d\n",intf_type);
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "Get Stats from OLT intf_type %d",intf_type);
 
    if(intf_type!=BAL_INTF_TYPE__BAL_INTF_TYPE_NNI && intf_type!=BAL_INTF_TYPE__BAL_INTF_TYPE_PON &&
 	intf_type!=BAL_INTF_TYPE__BAL_INTF_TYPE_EPON_1G_PATH &&
@@ -47,7 +47,7 @@
 
    /* Retrieve the Upstream packet and byte counts */
    BCMBAL_STAT_PROP_GET(&interface_stats, interface, all_properties);
-   ASFVOLT_LOG(ASFVOLT_DEBUG, "Retrieve the Upstream packet and byte count success\n");
+   ASFVOLT_LOG(ASFVOLT_DEBUG, "Retrieve the Upstream packet and byte count success");
 
    /* Read the NNI stats.
     * NOTE: When a CLEAR is specified during a NNI stats GET operation,
diff --git a/src/bal_subscriber_terminal_hdlr.c b/src/bal_subscriber_terminal_hdlr.c
index c0627ac..c2df2a6 100755
--- a/src/bal_subscriber_terminal_hdlr.c
+++ b/src/bal_subscriber_terminal_hdlr.c
@@ -39,7 +39,7 @@
     subs_terminal_key.sub_term_id = onu_cfg->key->sub_term_id;
     subs_terminal_key.intf_id = onu_cfg->key->intf_id;
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "Bringing up the subscriber terminal: %d\n", onu_cfg->key->sub_term_id);
+    ASFVOLT_LOG(ASFVOLT_INFO, "Bringing up the subscriber terminal: %d", onu_cfg->key->sub_term_id);
 
     /*
      * Set the key in the subscriber terminal object
@@ -56,8 +56,8 @@
 
        two_digit_buf[2] = 0;
 
-       ASFVOLT_LOG(ASFVOLT_DEBUG, "Before encoding,Vendor Id(%s),Vendor Specific Id(%s), Registration Id(%s)\n",
-		       onu_cfg->data->serial_number->vendor_id, 
+       ASFVOLT_LOG(ASFVOLT_DEBUG, "Before encoding,Vendor Id(%s),Vendor Specific Id(%s), Registration Id(%s)",
+		       onu_cfg->data->serial_number->vendor_id,
 		       onu_cfg->data->serial_number->vendor_specific,
 		       onu_cfg->data->registration_id);
 
@@ -69,8 +69,8 @@
 		       onu_cfg->data->serial_number->vendor_id[2],
 		       onu_cfg->data->serial_number->vendor_id[3]);
        onu_cfg->data->serial_number->vendor_id = vendor_id;
-       ASFVOLT_LOG(ASFVOLT_DEBUG, "After encoding,Vendor Id(%s),Vendor Specific Id(%s), Registration Id(%s)\n",
-		       onu_cfg->data->serial_number->vendor_id, 
+       ASFVOLT_LOG(ASFVOLT_DEBUG, "After encoding,Vendor Id(%s),Vendor Specific Id(%s), Registration Id(%s)",
+		       onu_cfg->data->serial_number->vendor_id,
 		       onu_cfg->data->serial_number->vendor_specific,
 		       onu_cfg->data->registration_id);
 
@@ -112,7 +112,7 @@
     if (!skip_onu)
     {
 
-       /*ASFVOLT_LOG(ASFVOLT_DEBUG, "Onu's(%d) Serial number %02x%02x%02x%2x%02x%02x%02x%02x\n", 
+       /*ASFVOLT_LOG(ASFVOLT_DEBUG, "Onu's(%d) Serial number %02x%02x%02x%2x%02x%02x%02x%02x",
              onu_cfg->key->sub_term_id,
              sub_term_obj.data->serial_number.vendor_id[0], sub_term_obj.data->serial_number.vendor_id[1],
              sub_term_obj.data->serial_number.vendor_id[2], sub_term_obj.data->serial_number.vendor_id[3],
@@ -121,16 +121,16 @@
 
        err = bcmbal_cfg_set(DEFAULT_ATERM_ID, &(sub_term_obj.hdr));
 
-       ASFVOLT_LOG(ASFVOLT_DEBUG, 
-                   "\n   ....SENT SUBSCRIBER TERMINAL %s UP %d on interface %d...\n",
-                   (BCM_ERR_OK != err) ? "NOT" : "\b",
+       ASFVOLT_LOG(ASFVOLT_DEBUG,
+                   "....SENT SUBSCRIBER TERMINAL %sUP %d on interface %d...",
+                   (BCM_ERR_OK != err) ? "NOT " : "",
                    subs_terminal_key.sub_term_id,
                    subs_terminal_key.intf_id);
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_DEBUG, 
-                   "Skipping activation of subscriber terminal %d on interface %d\n",
+       ASFVOLT_LOG(ASFVOLT_DEBUG,
+                   "Skipping activation of subscriber terminal %d on interface %d",
                    subs_terminal_key.sub_term_id,
                    subs_terminal_key.intf_id);
        err = BAL_ERRNO__BAL_ERR_PARM;
@@ -161,7 +161,7 @@
        {
           ASFVOLT_LOG(ASFVOLT_INFO, "New ONU Discovered. serial number "
                 "%2X%2X%2X%2X%1X%1X%1X%1X%1X%1X%1X%1X "
-                "on PON %d\n",
+                "on PON %d",
                 p_serial_number->vendor_id[0],
                 p_serial_number->vendor_id[1],
                 p_serial_number->vendor_id[2],
@@ -182,7 +182,7 @@
        {
           ASFVOLT_LOG(ASFVOLT_INFO, "Event on existing ONU. serial number "
                 "%2X%2X%2X%2X%1X%1X%1X%1X%1X%1X%1X%1X "
-                "on PON %d\n",
+                "on PON %d",
                 p_serial_number->vendor_id[0],
                 p_serial_number->vendor_id[1],
                 p_serial_number->vendor_id[2],
@@ -202,10 +202,10 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, 
-                   "Invalid object type %d for subscriber terminal indication\n",
+       ASFVOLT_LOG(ASFVOLT_ERROR,
+                   "Invalid object type %d for subscriber terminal indication",
                    obj->obj_type);
- 
+
     }
 
 #endif
@@ -222,11 +222,11 @@
     bcmbal_subscriber_terminal_cfg cfg;
     bcmbal_subscriber_terminal_key key = { };
 
-    ASFVOLT_LOG(ASFVOLT_INFO, 
-                    "Processing subscriber terminal cfg clear: %d\n",
+    ASFVOLT_LOG(ASFVOLT_INFO,
+                    "Processing subscriber terminal cfg clear: %d",
                      terminal_key->sub_term_id);
 
-    if (terminal_key->has_sub_term_id && 
+    if (terminal_key->has_sub_term_id &&
                     terminal_key->has_intf_id)
     {
         key.sub_term_id = terminal_key->sub_term_id ;
@@ -234,23 +234,23 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, 
-                   "Invalid Key to handle subscriber terminal clear Req.subscriber_terminal_id(%d), Interface ID(%d)\n",
+       ASFVOLT_LOG(ASFVOLT_ERROR,
+                   "Invalid Key to handle subscriber terminal clear Req.subscriber_terminal_id(%d), Interface ID(%d)",
                    key.sub_term_id, key.intf_id);
- 
+
         return BAL_ERRNO__BAL_ERR_PARM;
     }
 
     err = bcmbal_cfg_clear(DEFAULT_ATERM_ID, &cfg.hdr);
     err = BAL_ERRNO__BAL_ERR_OK;
     return err;
-} 
+}
 
 /********************************************************************\
  * Function    : bal_subscriber_terminal_cfg_get                    *
  * Description : Get the subscriber terminal(ONU) configuration     *
  ********************************************************************/
-uint32_t bal_subscriber_terminal_cfg_get(BalSubscriberTerminalKey *terminal_key, 
+uint32_t bal_subscriber_terminal_cfg_get(BalSubscriberTerminalKey *terminal_key,
                                          BalSubscriberTerminalCfg *onu_cfg)
 {
 
@@ -259,11 +259,11 @@
     bcmbal_subscriber_terminal_key key = { };   /**< declare key */
     uint8_t *list_mem;  /**< declare memory buffer for variable-sized lists */
 
-    ASFVOLT_LOG(ASFVOLT_INFO, 
-                    "Processing subscriber terminal cfg get: %d\n",
+    ASFVOLT_LOG(ASFVOLT_INFO,
+                    "Processing subscriber terminal cfg get: %d",
                      onu_cfg->key->sub_term_id);
 
-    if (terminal_key->has_sub_term_id && 
+    if (terminal_key->has_sub_term_id &&
                     terminal_key->has_intf_id)
     {
         key.sub_term_id = terminal_key->sub_term_id ;
@@ -271,10 +271,10 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, 
-                   "Invalid Key to handle subscriber terminal Cfg Get subscriber_terminal_id(%d), Interface ID(%d)\n",
+       ASFVOLT_LOG(ASFVOLT_ERROR,
+                   "Invalid Key to handle subscriber terminal Cfg Get subscriber_terminal_id(%d), Interface ID(%d)",
                    key.sub_term_id, key.intf_id);
- 
+
         return BAL_ERRNO__BAL_ERR_PARM;
     }
 
@@ -288,8 +288,8 @@
     if (list_mem == NULL)
     {
 
-       ASFVOLT_LOG(ASFVOLT_ERROR, 
-                   "Memory allocation failed while handling subscriber terminal cfg get subscriber_terminal_id(%d), Interface ID(%d)\n",
+       ASFVOLT_LOG(ASFVOLT_ERROR,
+                   "Memory allocation failed while handling subscriber terminal cfg get subscriber_terminal_id(%d), Interface ID(%d)",
                    key.sub_term_id, key.intf_id);
         return BAL_ERRNO__BAL_ERR_NOMEM;
     }
@@ -301,13 +301,13 @@
     err = bcmbal_cfg_get(DEFAULT_ATERM_ID, &cfg.hdr);
     if (err != BCM_ERR_OK)
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, 
-                   "Failed to get information from BAL subscriber_terminal_id(%d), Interface ID(%d)\n",
+       ASFVOLT_LOG(ASFVOLT_ERROR,
+                   "Failed to get information from BAL subscriber_terminal_id(%d), Interface ID(%d)",
                    key.sub_term_id, key.intf_id);
         return BAL_ERRNO__BAL_ERR_INTERNAL;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, 
-                  "To-Do. Send subscriber terminal details to Adapter\n");
+    ASFVOLT_LOG(ASFVOLT_INFO,
+                  "To-Do. Send subscriber terminal details to Adapter");
     return BAL_ERRNO__BAL_ERR_OK;
 }
diff --git a/src/bal_tmqueue_hdlr.c b/src/bal_tmqueue_hdlr.c
index 75f26ce..0e7e03b 100755
--- a/src/bal_tmqueue_hdlr.c
+++ b/src/bal_tmqueue_hdlr.c
@@ -43,29 +43,29 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the tm queue cfg(OLT): Missing Key values\
-                                   Recevied key values Id(%d), Sched-Dir(%d), Sched-Id(%d) \n", 
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the tm queue cfg(OLT): Missing Key values "
+                                  "Received key values Id(%d), Sched-Dir(%d), Sched-Id(%d)",
                                    tm_queue_cfg->key->sched_id, tm_queue_cfg->key->sched_dir, tm_queue_cfg->key->id);
        return BAL_ERRNO__BAL_ERR_NOENT;
     }
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Configuration of OLT(tm Queue) starts\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Configuration of OLT(tm Queue) starts");
 
     /* init the API struct */
     BCMBAL_CFG_INIT(&tm_queue_obj, tm_queue, key);
 
     /* decode API parameters from GRPC */
-    ASFVOLT_CFG_PROP_SET(tm_queue_obj, tm_queue, priority, 
-                         tm_queue_cfg->data->has_priority, 
+    ASFVOLT_CFG_PROP_SET(tm_queue_obj, tm_queue, priority,
+                         tm_queue_cfg->data->has_priority,
                          tm_queue_cfg->data->priority);
-    ASFVOLT_CFG_PROP_SET(tm_queue_obj, tm_queue, weight, 
-                         tm_queue_cfg->data->has_weight, 
+    ASFVOLT_CFG_PROP_SET(tm_queue_obj, tm_queue, weight,
+                         tm_queue_cfg->data->has_weight,
                          tm_queue_cfg->data->weight);
-    ASFVOLT_CFG_PROP_SET(tm_queue_obj, tm_queue, creation_mode, 
-                         tm_queue_cfg->data->has_creation_mode, 
+    ASFVOLT_CFG_PROP_SET(tm_queue_obj, tm_queue, creation_mode,
+                         tm_queue_cfg->data->has_creation_mode,
                          tm_queue_cfg->data->creation_mode);
-    ASFVOLT_CFG_PROP_SET(tm_queue_obj, tm_queue, ref_count, 
-                         tm_queue_cfg->data->has_ref_count, 
+    ASFVOLT_CFG_PROP_SET(tm_queue_obj, tm_queue, ref_count,
+                         tm_queue_cfg->data->has_ref_count,
                          tm_queue_cfg->data->ref_count);
 
     /* rating/shaping */
@@ -165,12 +165,12 @@
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the tm Queue Cfg(OLT)\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the tm Queue Cfg(OLT)");
         return err;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "\nSet tm Queue configuration sent to OLT. \
-                               Queue ID(%d) Sched ID(%d) Sched Dir(%d)\n", 
+    ASFVOLT_LOG(ASFVOLT_INFO, "Set tm Queue configuration sent to OLT. "
+                              "Queue ID(%d) Sched ID(%d) Sched Dir(%d)",
                                key.id, key.sched_id, key.sched_dir );
     return err;
 }
@@ -186,7 +186,7 @@
     bcmos_errno err = BCM_ERR_OK;
     bcmbal_tm_queue_cfg tm_queue_obj;   /**< declare main API struct */
     bcmbal_tm_queue_key key = { };      /**< declare key */
-    
+
     if((tm_queue_key->has_id) && (tm_queue_key->has_sched_id) && (tm_queue_key->has_sched_dir))
     {
        key.id = tm_queue_key->id;
@@ -195,13 +195,13 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the tm queue cfg(OLT): Missing Key values\
-                                   Recevied key values Id(%d), Sched-Dir(%d), Sched-Id(%d) \n", 
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the tm queue cfg(OLT): Missing Key values "
+                                  "Received key values Id(%d), Sched-Dir(%d), Sched-Id(%d) ",
                                    tm_queue_key->sched_id, tm_queue_key->sched_dir, tm_queue_key->id);
        return BAL_ERRNO__BAL_ERR_NOENT;
     }
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Clearing of OLT(tm Queue) starts\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Clearing of OLT(tm Queue) starts");
 
     /* init the API struct */
     BCMBAL_CFG_INIT(&tm_queue_obj, tm_queue, key);
@@ -210,12 +210,12 @@
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the tm Queue Cfg(OLT)\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the tm Queue Cfg(OLT)");
         return err;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "\nClear tm Queue sent to OLT. \
-                               Queue ID(%d) Sched ID(%d) Sched Dir(%d)\n", 
+    ASFVOLT_LOG(ASFVOLT_INFO, "Clear tm Queue sent to OLT. "
+                              "Queue ID(%d) Sched ID(%d) Sched Dir(%d)",
                                key.id, key.sched_id, key.sched_dir );
     return err;
 }
@@ -231,7 +231,7 @@
     bcmos_errno err = BCM_ERR_OK;
     bcmbal_tm_queue_cfg tm_queue_obj;   /**< declare main API struct */
     bcmbal_tm_queue_key key = { };      /**< declare key */
-    
+
     if((tm_queue_key->has_id) && (tm_queue_key->has_sched_id) && (tm_queue_key->has_sched_dir))
     {
        key.id = tm_queue_key->id;
@@ -240,13 +240,13 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the tm queue cfg(OLT): Missing Key values\
-                                   Recevied key values Id(%d), Sched-Dir(%d), Sched-Id(%d) \n", 
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the tm queue cfg(OLT): Missing Key values "
+                                  "Received key values Id(%d), Sched-Dir(%d), Sched-Id(%d)",
                                    tm_queue_key->sched_id, tm_queue_key->sched_dir, tm_queue_key->id);
        return BAL_ERRNO__BAL_ERR_NOENT;
     }
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Get tm queue cfg(for OLT) starts\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Get tm queue cfg(for OLT) starts");
 
     /* init the API struct */
     BCMBAL_CFG_INIT(&tm_queue_obj, tm_queue, key);
@@ -258,12 +258,12 @@
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the tm Queue Cfg(OLT)\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the tm Queue Cfg(OLT)");
         return err;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "\nGet tm Queue sent to OLT. \
-                               Queue ID(%d) Sched ID(%d) Sched Dir(%d)\n", 
+    ASFVOLT_LOG(ASFVOLT_INFO, "Get tm Queue sent to OLT. "
+                              "Queue ID(%d) Sched ID(%d) Sched Dir(%d)",
                                key.id, key.sched_id, key.sched_dir );
     return err;
 }
@@ -277,11 +277,9 @@
 bcmos_errno bal_tm_queue_cfg_indication_cb(bcmbal_obj *obj)
 {
     bcmos_errno result = BCM_ERR_OK;
-    ASFVOLT_LOG(ASFVOLT_INFO, "Processing API \'%s\' IND callback (status is %s)\n",
+    ASFVOLT_LOG(ASFVOLT_INFO, "Processing API \'%s\' IND callback (status is %s)",
 		    bcmbal_objtype_str(obj->obj_type),
 		    bcmos_strerror(obj->status));
-    
+
     return result;
 }
-
-
diff --git a/src/bal_tmsched_hdlr.c b/src/bal_tmsched_hdlr.c
index 1ed1b01..73c738b 100755
--- a/src/bal_tmsched_hdlr.c
+++ b/src/bal_tmsched_hdlr.c
@@ -33,7 +33,7 @@
     bcmos_errno err = BCM_ERR_OK;
     bcmbal_tm_sched_cfg tm_sched_obj;   /**< declare main API struct */
     bcmbal_tm_sched_key key = { };      /**< declare key */
-    
+
     if((tm_sched_cfg->key->has_dir) && (tm_sched_cfg->key->has_id))
     {
        key.dir = tm_sched_cfg->key->dir;
@@ -41,13 +41,13 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the tm schedule cfg(OLT): Missing Key values\
-                                   Recevied key values Sched-Dir(%d), Sched-Id(%d) \n", 
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the tm schedule cfg(OLT): Missing Key values "
+                                  "Received key values Sched-Dir(%d), Sched-Id(%d)",
                                    tm_sched_cfg->key->dir, tm_sched_cfg->key->id);
        return BAL_ERRNO__BAL_ERR_NOENT;
     }
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Configuration of OLT(tm Sched) starts\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Configuration of OLT(tm Sched) starts");
     /* init the API struct */
     BCMBAL_CFG_INIT(&tm_sched_obj, tm_sched, key);
 
@@ -124,8 +124,8 @@
        ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, owner, BCMOS_TRUE, valtmScOwn);
     }
 
-    ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, sched_type, 
-                         tm_sched_cfg->data->has_sched_type, 
+    ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, sched_type,
+                         tm_sched_cfg->data->has_sched_type,
                          tm_sched_cfg->data->sched_type);
 
     /* scheduler parent */
@@ -137,22 +137,22 @@
        if(schedPar->has_sched_id)
        {
           valSchedPar.sched_id = schedPar->sched_id;
-       } 
+       }
        if(schedPar->has_priority)
        {
           valSchedPar.priority = schedPar->priority;
-       } 
+       }
        if(schedPar->has_weight)
        {
           valSchedPar.weight = schedPar->weight;
-       } 
+       }
        ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, sched_parent, BCMOS_TRUE, valSchedPar);
     }
-     
-    ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, sched_child_type, 
-                         tm_sched_cfg->data->has_sched_child_type, 
+
+    ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, sched_child_type,
+                         tm_sched_cfg->data->has_sched_child_type,
                          tm_sched_cfg->data->sched_child_type);
-   
+
     /* rating/shaping */
     BalTmShaping *balShaping = (BalTmShaping *)tm_sched_cfg->data->rate;
     bcmbal_tm_shaping val = {};
@@ -176,7 +176,7 @@
 
     /* Extended itu dba parameters */
     BalExtendedItuDba *tItuDba = (BalExtendedItuDba *)tm_sched_cfg->data->ext_itu_dba;
-    bcmbal_extended_itu_dba valItuDda = {}; 
+    bcmbal_extended_itu_dba valItuDda = {};
     if (tItuDba != NULL && tItuDba->has_presence_mask)
     {
        valItuDda.presence_mask = tItuDba->presence_mask;
@@ -204,13 +204,13 @@
     }
 
     /* Creation mode */
-    ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, creation_mode, 
-                         tm_sched_cfg->data->has_creation_mode, 
+    ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, creation_mode,
+                         tm_sched_cfg->data->has_creation_mode,
                          tm_sched_cfg->data->creation_mode);
 
     /* Extended epon dba parameters */
     BalExtendedEponDba *teponDba = (BalExtendedEponDba*)tm_sched_cfg->data->ext_epon_dba;
-    bcmbal_extended_epon_dba valeponDda = {}; 
+    bcmbal_extended_epon_dba valeponDda = {};
     if (teponDba != NULL && teponDba->has_presence_mask)
     {
        valeponDda.presence_mask = teponDba->presence_mask;
@@ -258,13 +258,13 @@
        valQueues.val = (bcmbal_tm_queue_id *)malloc((valQueues.len)*sizeof(bcmbal_tm_queue_id));
        if(!valQueues.val)
        {
-          ASFVOLT_LOG(ASFVOLT_ERROR, 
-                     "Failed to configure the tm scheduler cfg(OLT): Memory Exhausted\n");
+          ASFVOLT_LOG(ASFVOLT_ERROR,
+                     "Failed to configure the tm scheduler cfg(OLT): Memory Exhausted");
           return BAL_ERRNO__BAL_ERR_NOMEM;
        }
-       memcpy((void *)valQueues.val, (const void *)balQueues->val, 
+       memcpy((void *)valQueues.val, (const void *)balQueues->val,
               (balQueues->n_val)*sizeof(uint32_t));
-       ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, queues, BCMOS_TRUE, valQueues); 
+       ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, queues, BCMOS_TRUE, valQueues);
     }
 
     /* Subsidiary schedulers */
@@ -276,29 +276,29 @@
        valSubScheds.val = (uint32_t *)malloc((valSubScheds.len)*sizeof(uint32_t));
        if(!valSubScheds.val)
        {
-          ASFVOLT_LOG(ASFVOLT_ERROR, 
-                     "Failed to configure the tm scheduler cfg(OLT): Memory Exhausted\n");
+          ASFVOLT_LOG(ASFVOLT_ERROR,
+                     "Failed to configure the tm scheduler cfg(OLT): Memory Exhausted");
           return BAL_ERRNO__BAL_ERR_NOMEM;
        }
-       memcpy((void *)valSubScheds.val, (const void *)balSubScheds->val, 
+       memcpy((void *)valSubScheds.val, (const void *)balSubScheds->val,
               (balSubScheds->n_val)*sizeof(uint32_t));
-       ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, sub_scheds, BCMOS_TRUE, valSubScheds); 
+       ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, sub_scheds, BCMOS_TRUE, valSubScheds);
     }
 
-    ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, num_priorities, 
-                         tm_sched_cfg->data->has_num_priorities, 
+    ASFVOLT_CFG_PROP_SET(tm_sched_obj, tm_sched, num_priorities,
+                         tm_sched_cfg->data->has_num_priorities,
                          tm_sched_cfg->data->num_priorities);
 
     err = bcmbal_cfg_set(DEFAULT_ATERM_ID, &(tm_sched_obj.hdr));
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the tm scheduler Cfg(OLT)\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to configure the tm scheduler Cfg(OLT)");
         return err;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "Set tm scheduler configuration sent to OLT. \
-                               Sched ID(%d) Sched Dir(%d)\n", key.id, key.dir);
+    ASFVOLT_LOG(ASFVOLT_INFO, "Set tm scheduler configuration sent to OLT. "
+                              "Sched ID(%d) Sched Dir(%d)", key.id, key.dir);
     return err;
 }
 
@@ -313,7 +313,7 @@
     bcmos_errno err = BCM_ERR_OK;
     bcmbal_tm_sched_cfg tm_sched_obj;   /**< declare main API struct */
     bcmbal_tm_sched_key key = { };      /**< declare key */
-    
+
     if((tm_sched_cfg->key->has_dir) && (tm_sched_cfg->key->has_id))
     {
        key.dir = tm_sched_cfg->key->dir;
@@ -321,14 +321,14 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the tm schedule cfg(OLT): Missing Key values\
-                                   Recevied key values Sched-Dir(%d), Sched-Id(%d) \n", 
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the tm schedule cfg(OLT): Missing Key values "
+                                  "Received key values Sched-Dir(%d), Sched-Id(%d)",
                                    tm_sched_cfg->key->dir, tm_sched_cfg->key->id);
        return BAL_ERRNO__BAL_ERR_NOENT;
     }
-    
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Gem tm scheduler cfg (for OLT) starts\n");
+
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Gem tm scheduler cfg (for OLT) starts");
 
     /* init the API struct */
     BCMBAL_CFG_INIT(&tm_sched_obj, tm_sched, key);
@@ -340,12 +340,12 @@
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the tm scheduler Cfg(OLT)\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to get the tm scheduler Cfg(OLT)");
         return err;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "Get tm scheduler cfg sent to OLT. \
-                               Sched ID(%d) Sched Dir(%d)\n", key.id, key.dir);
+    ASFVOLT_LOG(ASFVOLT_INFO, "Get tm scheduler cfg sent to OLT. "
+                              "Sched ID(%d) Sched Dir(%d)", key.id, key.dir);
     return err;
 }
 
@@ -360,7 +360,7 @@
     bcmos_errno err = BCM_ERR_OK;
     bcmbal_tm_sched_cfg tm_sched_obj;   /**< declare main API struct */
     bcmbal_tm_sched_key key = { };      /**< declare key */
-    
+
     if((tm_sched_key->has_dir) && (tm_sched_key->has_id))
     {
        key.dir = tm_sched_key->dir;
@@ -368,13 +368,13 @@
     }
     else
     {
-       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the tm schedule cfg(OLT): Missing Key values\
-                                   Recevied key values Sched-Dir(%d), Sched-Id(%d) \n", 
+       ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the tm schedule cfg(OLT): Missing Key values "
+                                  "Received key values Sched-Dir(%d), Sched-Id(%d)",
                                    tm_sched_key->dir, tm_sched_key->id);
        return BAL_ERRNO__BAL_ERR_NOENT;
     }
 
-    ASFVOLT_LOG(ASFVOLT_DEBUG, "Clear tm scheduler cfg(for OLT) starts\n");
+    ASFVOLT_LOG(ASFVOLT_DEBUG, "Clear tm scheduler cfg(for OLT) starts");
 
     /* init the API struct */
     BCMBAL_CFG_INIT(&tm_sched_obj, tm_sched, key);
@@ -383,12 +383,12 @@
 
     if(BCM_ERR_OK != err)
     {
-        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the tm scheduler Cfg(OLT)\n");
+        ASFVOLT_LOG(ASFVOLT_ERROR, "Failed to clear the tm scheduler Cfg(OLT)");
         return err;
     }
 
-    ASFVOLT_LOG(ASFVOLT_INFO, "Clear tm scheduler clear sent to OLT. \
-                               Sched ID(%d) Sched Dir(%d)\n", key.id, key.dir);
+    ASFVOLT_LOG(ASFVOLT_INFO, "Clear tm scheduler clear sent to OLT. "
+                              "Sched ID(%d) Sched Dir(%d)", key.id, key.dir);
     return err;
 }
 
@@ -401,10 +401,10 @@
 bcmos_errno bal_tm_sched_cfg_indication_cb(bcmbal_obj *obj)
 {
     bcmos_errno result = BCM_ERR_OK;
-    ASFVOLT_LOG(ASFVOLT_INFO, "Processing API (%s) IND callback status is (%s)\n",
+    ASFVOLT_LOG(ASFVOLT_INFO, "Processing API (%s) IND callback status is (%s)",
 		    bcmbal_objtype_str(obj->obj_type),
 		    bcmos_strerror(obj->status));
-    
+
     return result;
 }