fjpanag commented on a change in pull request #3050: URL: https://github.com/apache/incubator-nuttx/pull/3050#discussion_r593896248
########## File path: drivers/syslog/syslog_channel.c ########## @@ -141,8 +145,14 @@ int syslog_channel(FAR const struct syslog_channel_s *channel) { DEBUGASSERT(channel->sc_putc != NULL && channel->sc_force != NULL); - g_syslog_channel = channel; - return OK; + for (int i = 0; i < CONFIG_SYSLOG_MAX_CHANNELS; i++) Review comment: I am thinking that a function like `syslog_channel_remove` will be needed. For example, in cases like logging in a file in an external medium (e.g. SD Card), the syslog channel must be removed when the medium is also unmounted. In the case of adding and removing channels dynamically, what will be the default channel? It will not be sure that it will be the first in the list... I am leaning more towards dropping `syslog_channel` and adding `syslog_channel_add` & `syslog_channel_remove`, if you agree. ---------------------------------------------------------------- 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