3.0.0 - 2023-08-12
- Migrate built-in HTTP from
hackney
toFinch
- Replace the
:adapter
with the:client
option - Remove the
:proxy
option
- Log a warning if sending fails
- Allow messages to be filtered by a metadata key
- Escape metadata fields when sending messages
- Fix deprecation warnings on Elixir 1.15
Add :finch
to your list of dependencies in mix.exs
:
def deps do
[
{:logger_telegram_backend, "~> 3.0"},
{:finch, "~> 0.16"},
]
end
-
In your
Application.start/2
callback, add theLoggerTelegramBackend
backend:def start(_type, _args) do + LoggerTelegramBackend.attach()
-
Remove the
:backends
configuration from:logger
:config :logger, - backends: [LoggerTelegramBackend, :console]
Configuration is now done via the LoggerTelegramBackend
key:
- config :logger, :telegram,
+ config :logger, LoggerTelegramBackend,
# ...
-
Remove the
:adapter
configuration and -
Add the
:client
option and pass your own module that implements theLoggerTelegramBackend.HTTPClient
behaviourconfig :logger, LoggerTelegramBackend, - adapter: {Tesla.Adapter.Gun, []} + client: MyGunAdapter
See the documentation for
LoggerTelegramBackend.HTTPClient
for more information.
-
Remove the
:proxy
configuration -
Add the
:client_pool_opts
configurationconfig :logger, LoggerTelegramBackend, - proxy: "socks5://127.0.0.1:9050" + client_pool_opts: [conn_opts: [proxy: {:http, "127.0.0.1", 9050, []}]]
See Pool Configuration Options for further information.
2.0.1 - 2021-05-02
- Don't crash if sending an event does not succeed
2.0.0 - 2020-12-22
- Use tesla to make the underlying HTTP client configurable
-
Make hackney an optional dependency. To use the default
hackney
based adapter, add it to the list of dependencies:def deps do [ {:logger_telegram_backend, "~> 2.0.0"}, {:hackney, "~> 1.17"} ] end
1.3.0 - 2019-07-22
- Respect maximum message length to avoid MESSAGE_TOO_LONG errors
- Bump ex_doc from 0.20.2 to 0.21.1
1.2.1 - 2019-05-27
- Bump httpoison from 1.4.0 to 1.5.1
- Bump ex_doc from 0.19.1 to 0.20.2
1.2.0 - 2018-11-28
- Add proxy support (from @mvalitov)
1.1.0 - 2018-11-26
- Remove dependency on
Poison
: the success of a request is now solely determined by the HTTP status code. - Remove
GenStage
and simplify the overall event handling logic - Update dependencies
1.0.3 - 2018-05-25
- Add
@impl
attributes
- Update dependencies
- Format code
- Fix typo in README
1.0.2 - 2018-03-01
- Update
httpoison
to 1.0
1.0.1 - 2018-02-10
- Update Dependencies