lwan icon indicating copy to clipboard operation
lwan copied to clipboard

Implement logging

Open lpereira opened this issue 11 years ago • 3 comments

lpereira avatar Jan 08 '14 11:01 lpereira

  • Write logs to shared memory
  • Another process may save the logs or forward to another machine
  • If logs are not saved, they're discarded
  • Protected via seqlocks

lpereira avatar Jan 08 '14 11:01 lpereira

What do you think about do it modular, we can have plugins to logging into a shm or to a pipe or wherever the user want, Is it a bad idea, the overhead will too much ?

ceolin avatar Jan 11 '14 01:01 ceolin

The problem with pipes is that you need a syscall each time a request is logged -- whereas writing to a shared memory, you just write to the memory and the hardware takes care of controlling the access. I don't have numbers to prove it, but my intuition says that SHM will be a lot cheaper.

I tend to avoid having a modular design to avoid possible overhead.

In any case, having this feature is better than not having it, so if you're interested in implementing something, go for it!

lpereira avatar Jan 11 '14 01:01 lpereira