xiaoxiang781216 commented on issue #1153:
URL: 
https://github.com/apache/incubator-nuttx-apps/issues/1153#issuecomment-1107445241

   > Here is the background: I have a dev-board which has limited number of 
pins. So I have to disable CONFIG_NSH_CONSOLE and use all the pins for other 
purposes. I have disabled it and booted the system, the system runs and gives 
the expected results(can be examined by detecting PWM or other peripheral 
output). However, it is still painful without log output, so I want to redirect 
all syslog output to telnet.
   > 
   > After some thinking, I think one solution is:
   > 
   > 1. Create a syslog channel when telnet_session is created. The code may be 
something like:
   > 
   > ```
   > int syslog_telnet_channel(FAR struct telnet_session_s *session)
   > {
   >   g_syslog_telnet_channel = syslog_dev_initialize(session->ts_devpath,    
// will be the same name as telnet device, 
   >                                                OPEN_FLAGS, OPEN_MODE);
   >   if (g_syslog_telnet_channel == NULL)
   >     {
   >       return -ENOMEM;
   >     }
   > 
   >   return syslog_channel(g_syslog_telnet_channel );
   > }
   > ```
   > 
   > 2. Also need to add lock mechanism in telnet_write, it will be called from 
different task now
   > 
   > Is this the right way?
   
   This solution can't handle the log from interrupt or panic. Why not use 
ramlog?
   


-- 
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: commits-unsubscr...@nuttx.apache.org

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

Reply via email to