There is a terrible misunderstanding here I fear: do you understand what causes a segfault ?
In the trivial case, a segfault is caused by a null dereference. It's easy to fix because the issue is generally easy to spot.
However, in the nasty cases, a segfault is triggered by a memory corruption which wrote garbage where you would expect a regular pointer and led you to try and reach into memory you should not have.
Now, imagine that you register a handler for the segfault. Obviously, you cannot distinguish whether you are in the trivial or nasty case, so you should assume the memory is corrupted and that you cannot trust it...
What makes you think that the log messages would not be corrupted ?
No sane library should try and handle a segfault.
In case of segfault, dump the memory state into a core-dump file and crash hard. If you cannot trust memory, you cannot take any meaningful action anyway.