Logging code typically involves the formatting of long descriptors and their writing out to files. For this reason they are often the cause of stack overflows.