I have a master socket server that forks children who receive sockets and the messages that come through them... I was wondering if I could write to a file from the master AND the children at the same time, asynchronously, one line by each process with datetime.toISOString() - pid - message received:
//Example
2015-01-01T00:00:00.000Z - 10023 - foobar
2015-01-01T00:01:00.000Z - 10024 - barfoo
2015-01-01T00:02:00.000Z - 10023 - farboo
2015-01-01T00:03:00.000Z - 10023 - foabor
Is this possible? How should I proceed for that?
Aucun commentaire:
Enregistrer un commentaire