No need to declare these variables static.
Align comments.
Make the maximum size of the value field as large as the input buffer in guifuncs.
Ensure there is enough room for the copy of the new log filename.
Rename configuration file item 'logfile' to 'outlogfile' for clarity.
Plug a potential memory corruption bug when users would pass too long key values in the configuration file.

While here strip leading and trailing blanks from keys and values
(including the '\n' left by fgets()).
Replace some common code by a macro.