Hexoku.API.LogDrains

Log drains provide a way to forward your Heroku logs to an external syslog server for long-term archiving. This external service must be configured to receive syslog packets from Heroku, whereupon its URL can be added to an app using this API.

Attributes

id
unique identifier of item generated by Heroku
addon
addon that created the drain
addon:id
unique identifier of add-on
token
token associated with the log drain
url
url associated with the log drain
created_at
when item was created
updated_at
when item was last modified

For more info read the Heroku API Reference

Source

Summary

create(client, app, url)

Create a new log drain

delete(client, app, drain)

Delete an existing log drain. Log drains added by add-ons can only be removed by removing the add-on

info(client, app, drain)

Info for existing log drain

list(client, app)

List existing log drains

Functions

create(client, app, url)

Specs:

  • create(Hexoku.Client.t, binary, binary) :: Map.t

Create a new log drain.

Examples

client |> Hexoku.API.LogDrains.create("myapp", "syslog://1234")
Source
delete(client, app, drain)

Specs:

  • delete(Hexoku.Client.t, binary, binary) :: Map.t

Delete an existing log drain. Log drains added by add-ons can only be removed by removing the add-on.

Examples

client |> Hexoku.API.LogDrains.delete("myapp", "01234567-89ab-cdef-0123-456789abcdef")
Source
info(client, app, drain)

Specs:

  • info(Hexoku.Client.t, binary, binary) :: Map.t

Info for existing log drain.

Examples

client |> Hexoku.API.LogDrains.info("myapp", "01234567-89ab-cdef-0123-456789abcdef")
Source
list(client, app)

Specs:

  • list(Hexoku.Client.t, binary) :: [Map.t]

List existing log drains.

Examples

client |> Hexoku.API.LogDrains.list("myapp")
Source