I need to debug some issue on a production server, and I'm trying to decide whether to use strace or the log4cxx logging library; one crucial characteristic I need to know before, is which of the two would have lower impact on performance (speed, mostly)?
For strace, I'm planning for a commandline roughly like below:
strace -p PID -tt -f -e SOME,SELECTED,SYSCALLS -o FILENAME # or maybe with "-ff" instead? which one would be faster?
For log4cxx, for simplicity we can probably assume I'm calling the logging functions just before doing each syscall I want to trace. Assume version log4cxx-0.10.0, 64 bit.
If what you would suggest is benchmarking this by myself, then I'd be grateful for help on how to write the benchmarks.