fixed identation
added doc comment
automatically detect if filename is socket and choose syslog or file handler
updated docs