diff --git a/HISTORY.rst b/HISTORY.rst index 5df1f0171..1ee9f4cdd 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,6 +2,13 @@ History ======= +0.5.0 (2017-06-28) +------------------ + +* Big refactor to class-based +* Syslog support +* Some fixes + 0.4.0 (2017-06-15) ------------------ diff --git a/README.rst b/README.rst index a98d704d2..05ee8e604 100644 --- a/README.rst +++ b/README.rst @@ -108,6 +108,8 @@ Optional default: empty - ``DL_DIR``: Parent directory for MP3 download directory, default: ~ (user's home directory) +- ``SYSLOG_ADDRESS``: Syslog server, for example ``logsX.papertrailapp.com:ABCDE`` +- ``HOSTNAME``: Hostname to show up in Syslog messages Running Locally ~~~~~~~~~~~~~~~ diff --git a/scdlbot/__main__.py b/scdlbot/__main__.py index 404fab497..d860ef984 100755 --- a/scdlbot/__main__.py +++ b/scdlbot/__main__.py @@ -21,5 +21,6 @@ def main(): app_url, app_port, bin_path, sc_auth_token, store_chat_id, no_clutter_chat_ids, dl_dir) + if __name__ == '__main__': main() diff --git a/scdlbot/scdlbot.py b/scdlbot/scdlbot.py index 82f57f498..5b391f89d 100644 --- a/scdlbot/scdlbot.py +++ b/scdlbot/scdlbot.py @@ -32,7 +32,7 @@ syslog_handler = SysLogHandler(address=(syslog_hostname, syslog_udp_port)) handlers.append(syslog_handler) -logging.basicConfig(format='%(asctime)s {} %(name)s: %(message)s'.format(os.getenv("HOSTNAME", "host")), +logging.basicConfig(format='%(asctime)s {} %(name)s: %(message)s'.format(os.getenv("HOSTNAME", "unknown_host")), datefmt='%b %d %H:%M:%S', level=logging.DEBUG, handlers=handlers) logger = logging.getLogger(__name__)