xiaoxiang781216 commented on PR #16977:
URL: https://github.com/apache/nuttx/pull/16977#issuecomment-3270622862

   > > > This API needs to meet the following characteristics, but the API in 
the current system cannot meet request: print "robust, synchronous, anytime, 
anywhere"
   > > 
   > > 
   > > you can achieve all above goals by enabling only g_default_channel_ops: 
https://github.com/apache/nuttx/blob/master/drivers/syslog/syslog_channel.c#L168
 why do we need add a new API? do you plan changing all syslog in kernel to 
printk or do you think other log in kernel isn't enough important to get the 
same treatment?
   > 
   > @xiaoxiang781216 I'm curious why you asked us why to add a new API. **It's 
because you! removed the implementation of synchronous printing** :
   > 
   > #3736
   > **syslog()** supports synchronous output at the LOG_EMERG level, Why was 
such a useful feature removed?
   > 
   
   i already highlight the reason in the pr:
   since emergstream always call syslog_force, but syslog_force is designed
   for the interrupt context, and then doesn't mean any emergency thing.
   On the other hand, emergstream has other bad side effect:
   1.Can't output to file or dev channel
   2.Can't work well with the interrupt buffer
   
   > `g_default_channel_ops` is one of multiple channel implementations. If 
`CONFIG_SYSLOG_MAX_CHANNELS > 1` and there are multiple channel implementation 
backends, it should not be used in an emergency.
   
   When i submit #3736, there is no multiple syslog channel support at all. So, 
#3736 keep "robust, synchronous, anytime, anywhere" at that time. Even with the 
multiple syslog channel config, the syslog framework self is still robust and 
synchronous. If your concern is some syslog channel backend isn't good enough 
for emerge output, why not improve that backend directly?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to