You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/26 13:27:58 UTC

[GitHub] [incubator-nuttx] gustavonihei edited a comment on issue #3599: Syslog thread-safety

gustavonihei edited a comment on issue #3599:
URL: https://github.com/apache/incubator-nuttx/issues/3599#issuecomment-826835059


   > > Regarding logging, I'd say there are at least two stages: the generation/capture and the publication/notification. I agree that the first stage must be synchronous and must contain a precise context, otherwise it may lose effectiveness. But the publication I am not sure if needs to be handled the same way.
   > 
   > Can you please elaborate on this? An example maybe? I like the general idea, but I would like to see how you have it in mind.
   
   Sure. I'll assume we have a thread dedicated for the publishing of the syslog message with a given priority level. The publication should be asynchronous because this action may be as simple as pushing the message into a RAMLOG buffer or even sending it to a Logstash server via a secure TCP socket (assuming that one day the syslog message becomes compliant with [RFC5424](https://tools.ietf.org/html/rfc5424)).
   
   For the generation of syslog messages, we would just need to associate them with a timestamp (or another reliable value that may represent the passage of time, e.g. clock ticks) and they'd be pushed to a shared buffer.
   


-- 
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:
users@infra.apache.org