external variables; msglogprint() opened closed

External mute and logFlag in main.c are back! We need them to
remember the logFlag between reconnects.
Added log opened and log closed messages.
C++-style comments -> C-style comments