Logging to disk shouldn't be too much a performance hit. Main thing you should be aware of is to use buffered writes (which is conceptually similar to keeping a queue of structs but is more standard) because calling the write() syscall is expensive. On Unix you can achieve 'background'** writes by piping the output to an intermediate buffer (e.g. mbuffer, pv, buffer). Another thing you might want to consider is to use a very light compressor (lzop or lz4) in between the application and the disk. Counter-intuitively you can actually get higher throughput because the cost of using CPU cycles to do compression is offset by the gain in disk bandwidth usage.
write(2) will still be relatively buffered unless one explicitly opens the FD it uses with O_DIRECT. The main performance hit will be in the context switch from crossing the userland<>kernel barrier in calling a syscall. None of that is needed though as typical stdio.h routines are all buffered (fwrite, fprintf, etc). I honestly don't think the disk i/o will even be a concern here as the data will have been reduced from the network side into smaller units. Even when the stdio routines (and write() for that matter) flush buffers there's still the filesystem cache which will have it's own buffering. In short the writing out of data will hit multiple buffers and be done efficiently by the OS for the most part.
**Occuring in the 'background' is a bit misleading here. Technically writes are performed to the pipe, typically implemented in the kernel as a ring buffer. Some memory copies are therefore being performed but the overhead is much lower and more deterministic than hitting the disk. If you were really enterprising you could avoid the overhead; manage the buffers in the application and use non-blocking writes, or multiple threads with some machinery for synchronization like some sort of ring buffer, or abuse the garbage collector by maintaining some sort of linked list, or get more creative. Sky's the limit really.
Any reasonably modern unix kernel will buffer pages to be written to backing store via a page cache and the kernel will handle that on it's own (Linux users can see metrics on this in /proc/meminfo). Where it would be an issue is if the buffers are not able to be flushed faster than the caller is writing to them. I doubt that'll be the case. WRT to non-blocking file I/O, either threads or async IO (aio.h) for files as files specifically are already non-blocking in nature.
Best bet here is to write a coarse prototype, get it working, make it correct, then profile it to see where the actual bottlenecks are. My bet is it'll be entirely I/O bound on the network.