11# Changelog
22
3- ## 3.0.0 - unreleased
3+ ## [ 3.0.0] - 12.08.2023
4+
5+ ### Breaking Changes
6+
7+ - Migrate built-in HTTP from ` hackney ` to ` Finch `
8+ - Replace the` :adapter ` with the ` :client ` option
9+ - Remove the ` :proxy ` option
10+
11+ ### Changes
12+
13+ - Log a warning if sending fails
14+ - Allow messages to be filtered by a metadata key
15+
16+ ### Bug fixes
17+
18+ - Escape metadata fields when sending messages
19+ - Fix deprecation warnings on Elixir 1.15
420
521### Upgrade Instructions
622
723#### Dependencies
824
9- LoggerTelegramBackend now ships with an HTTP client based on ` :finch ` instead of ` :hackney ` .
10-
1125Add ` :finch ` to your list of dependencies in ` mix.exs ` :
1226
1327``` elixir
1428def deps do
1529 [
16- {:logger_telegram_backend , " ~> 3.0-rc " },
30+ {:logger_telegram_backend , " ~> 3.0" },
1731 {:finch , " ~> 0.16" },
1832 ]
1933end
2337
24381 . In your ` Application.start/2 ` callback, add the ` LoggerTelegramBackend ` backend:
2539
26- ``` elixir
27- @impl true
40+ ``` diff
2841 def start(_type, _args) do
29- LoggerTelegramBackend .attach ()
30-
31- # ...
32- end
42+ + LoggerTelegramBackend.attach()
3343 ```
3444
35452 . Remove the ` :backends ` configuration from ` :logger ` :
4151
4252#### Config
4353
44- Configuration is now done via ` config :logger, LoggerTelegramBackend` .
54+ Configuration is now done via the ` LoggerTelegramBackend ` key:
4555
4656``` diff
4757- config :logger, :telegram,
@@ -54,54 +64,26 @@ Configuration is now done via `config :logger, LoggerTelegramBackend`.
54641 . Remove the ` :adapter ` configuration and
55652 . Add the ` :client ` option and pass your own module that implements the ` LoggerTelegramBackend.HTTPClient ` behaviour
5666
57- ``` diff
58- config :logger, LoggerTelegramBackend,
59- - adapter: {Tesla.Adapter.Gun, []}
60- + client: MyGunAdapter
61- ```
67+ ``` diff
68+ config :logger, LoggerTelegramBackend,
69+ - adapter: {Tesla.Adapter.Gun, []}
70+ + client: MyGunAdapter
71+ ```
6272
63- See the documentation for ` LoggerTelegramBackend.HTTPClient ` for more information.
73+ See the documentation for ` LoggerTelegramBackend.HTTPClient ` for more information.
6474
6575#### Proxy (optional)
6676
67771 . Remove the ` :proxy ` configuration
68782 . Add the ` :client_pool_opts ` configuration
6979
70- ``` diff
71- config :logger, LoggerTelegramBackend,
72- - proxy: "socks5://127.0.0.1:9050"
73- + client_pool_opts: [conn_opts: [proxy: {:http, "127.0.0.1", 9050, []}]]
74- ```
75-
76- ## [ 3.0.0-rc.2] - 2023-08-07
77-
78- - Remove hackney client
79- - Pass client opts to callback implementations
80- - Set user agent
81- - Wrap LoggerBackends functions
82- - Run tests on Elixir 1.10 / OTP 21
83-
84- ## [ 3.0.0-rc.1] - 2023-08-07
85-
86- ### Changes
87-
88- - Add HTTP client for ` Finch `
89-
90- ## [ 3.0.0-rc.0] - 2023-08-06
91-
92- ### Breaking Changes
93-
94- - Allow to customize the HTTP client
95- - Remove ` :proxy ` option
96-
97- ### Changes
98-
99- - Log a warning if sending fails
100-
101- ### Bug fixes
80+ ``` diff
81+ config :logger, LoggerTelegramBackend,
82+ - proxy: "socks5://127.0.0.1:9050"
83+ + client_pool_opts: [conn_opts: [proxy: {:http, "127.0.0.1", 9050, []}]]
84+ ```
10285
103- - Escape metadata fields
104- - Fix deprecation warnings
86+ See [ Pool Configuration Options ] ( https://hexdocs.pm/finch/Finch.html#start_link/1-pool-configuration-options ) for further information.
10587
10688## [ 2.0.1] - 2021-05-02
10789
@@ -185,9 +167,7 @@ config :logger, LoggerTelegramBackend,
185167
186168## [ 1.0.0] - 2018-01-14
187169
188- [ 3.0.0-rc.2 ] : https://github.com/adriankumpf/logger-telegram-backend/compare/v3.0.0-rc.1...v3.0.0-rc.2
189- [ 3.0.0-rc.1 ] : https://github.com/adriankumpf/logger-telegram-backend/compare/v3.0.0-rc.0...v3.0.0-rc.1
190- [ 3.0.0-rc.0 ] : https://github.com/adriankumpf/logger-telegram-backend/compare/v2.0.1...v3.0.0-rc.0
170+ [ 3.0.0 ] : https://github.com/adriankumpf/logger-telegram-backend/compare/v2.0.1...v3.0.0
191171[ 2.0.1 ] : https://github.com/adriankumpf/logger-telegram-backend/compare/v2.0.0...v2.0.1
192172[ 2.0.0 ] : https://github.com/adriankumpf/logger-telegram-backend/compare/v1.3.0...v2.0.0
193173[ 1.3.0 ] : https://github.com/adriankumpf/logger-telegram-backend/compare/v1.2.1...v1.3.0
0 commit comments