vrahane commented on code in PR #3400:
URL: https://github.com/apache/mynewt-core/pull/3400#discussion_r2076092180


##########
sys/log/full/include/log/log.h:
##########
@@ -204,6 +309,16 @@ STATS_SECT_END
 #define LOG_STATS_INCN(log, name, cnt)
 #endif
 
+/* Trailer support callbacks */
+struct log_trailer_handler {
+    log_trailer_len_func_t *log_trailer_len;
+    log_trailer_data_len_func_t *log_trailer_data_len;
+    log_trailer_append_func_t *log_trailer_append;
+    log_process_trailer_func_t *log_process_trailer;
+    log_trailer_mbuf_append_func_t *log_trailer_mbuf_append;
+    log_trailer_reset_data_func_t *log_trailer_reset_data;
+};

Review Comment:
   - So, earlier I had `l_trailer_arg` which you wanted me to make private so, 
I moved that out. Now, there needs to be a way to reset that trailer data which 
is what `trailer_reset_data` allows. If you have any other way to perform a 
reset, please let me know. This is called from `log_flush`.
   - `trailer_len` helps user of the library to get the length of the trailer 
as the name suggest.
   - `trailer_data_len` helps user of the library get the length of the trailer 
data. This was used earlier before I got rid of `l_trailer_arg` but now since 
the callbacks take care of the trailer data. I can remove it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to