fjpanag commented on a change in pull request #3842:
URL: https://github.com/apache/incubator-nuttx/pull/3842#discussion_r645476406



##########
File path: drivers/syslog/syslog_filechannel.c
##########
@@ -108,6 +168,12 @@ FAR struct syslog_channel_s *syslog_file_channel(FAR const 
char *devpath)
       syslog_dev_uninitialize(g_syslog_file_channel);
     }
 
+  /* Rotate the log file, if needed. */
+
+#ifdef CONFIG_SYSLOG_FILE_ROTATE
+  log_rotate(devpath);

Review comment:
       > It isn't rare, many IoT product will run a long time.
   
   I mean, it is rare to have a system run for so long AND produce so much 
*system* logs at the same time that fill up today's huge memories. Most IoT 
devices are low-power, and do not have very verbose logs...
   
   To be honest, I don't ever expect a several GB SD to fill-up. My primary 
concern is to somehow constrain the log size, in case I need to upload it to an 
external server. So it doesn't get into gigabyte scale after several 
months/years.  
   This is why I don't emphasize on log size accuracy, rather than performance.
   
   > The rename process for all filesystem implementaiton should be fast and 
not relate to the file size.
   
   I am not that much concerned about how fast the operation is. Rather that it 
is an **extra** step to take, that occurs unpredictably.  
   This is what affects real-time performance. You calculate/measure the 
timings of the application, and then randomly they may be violated.
   
   Another thing is that `syslog_device` knows nothing about files. It may log 
to a file, or maybe to a character device.  
   The only place that we know for sure that the log is on a file, and that it 
needs rotation is in `syslog_file_channel`.  
   So how can `syslog_device` perform the rotation?




-- 
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.

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


Reply via email to