Start documenting plog module. Rearrange import section. Replace
star-import from socket with module import, so pylint does not complain
about unused symbols and global scope is cleaner.
Remove global statements from functions which do not change global
variables.
Extract date and time formatting into separate functions. Fix pylint
complaints about fp variable name.
Fix pylint complaints about missing space after operator and line length.
Add more docstrings
Move code for script execution into main function. Pass appname value to
run function from config.
Docstring for index module. Fix pylint complaints about lines length and
unused imports.