Fixed log file typo.
Fixed syntax error.
Made loggers simpler.
Moved shared stuff in gearman workers to a separate file.