diff --git a/hoover/handlers.py b/hoover/handlers.py index 20b8b47..43acc60 100644 --- a/hoover/handlers.py +++ b/hoover/handlers.py @@ -12,7 +12,7 @@ class LogglyHttpHandler(logging.Handler): def __init__(self, session=None, token='', inputname='', input=None, - announce=False, json_class=None, secure=True, proxy=None): + announce=False, json_class=None, secure=True, proxy=None, tag=''): logging.Handler.__init__(self) if inputname: # TODO: raise something appropriate if session is None @@ -28,7 +28,7 @@ def __init__(self, session=None, token='', inputname='', input=None, self.token = token protocol = secure and 'https' or 'http' proxy = proxy or session.proxy - self.endpoint = "%s://%s/inputs/%s" % (protocol, proxy, token) + self.endpoint = "%s://%s/inputs/%s/tag/%s" % (protocol, proxy, token, tag) self.json_class = json_class # TODO: verify we can write to the input if announce: