Skip to content

Commit 77c14e6

Browse files
committed
Release 3.0.0
1 parent a30ca2f commit 77c14e6

4 files changed

Lines changed: 41 additions & 57 deletions

File tree

CHANGELOG.md

Lines changed: 34 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
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-
1125
Add `:finch` to your list of dependencies in `mix.exs`:
1226

1327
```elixir
1428
def deps do
1529
[
16-
{:logger_telegram_backend, "~> 3.0-rc"},
30+
{:logger_telegram_backend, "~> 3.0"},
1731
{:finch, "~> 0.16"},
1832
]
1933
end
@@ -23,13 +37,9 @@ end
2337

2438
1. 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

3545
2. Remove the `:backends` configuration from `:logger`:
@@ -41,7 +51,7 @@ end
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`.
5464
1. Remove the `:adapter` configuration and
5565
2. 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

6777
1. Remove the `:proxy` configuration
6878
2. 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

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) [year] [fullname]
3+
Copyright (c) 2023 Adrian Kumpf
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ In your `Application.start/2` callback, add the `LoggerTelegramBackend`:
3030
def start(_type, _args) do
3131
LoggerTelegramBackend.attach()
3232

33-
# ...
33+
# ...
3434
end
3535
```
3636

@@ -54,3 +54,7 @@ Then send a message to the bot and get your `chat_id`:
5454
TOKEN="your_bot_token"
5555
curl https://api.telegram.org/bot$TOKEN/getUpdates
5656
```
57+
58+
## License
59+
60+
This project is Licensed under the [MIT License](LICENSE).

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule LoggerTelegramBackend.Mixfile do
22
use Mix.Project
33

4-
@version "3.0.0-rc.2"
4+
@version "3.0.0"
55
@source_url "https://github.com/adriankumpf/logger-telegram-backend"
66

77
def project do

0 commit comments

Comments
 (0)