I've thrown together a utility for my programs to log to a database, but the code looks like a mess and I don't know how to clean it up. I'd be thankful for any suggestions. This library is going to be used from all of my other programs and it is therefore important to keep the code clean and secure.
Here is also the definition of my LOG_ENTRYLOG_ENTRY struct.: