Skip to content
This repository was archived by the owner on Dec 8, 2020. It is now read-only.

Commit eb7f90e

Browse files
Prepare 3.1.0 (#341)
* fix dialyzer warnings * fix credo * update changelog * update version * fix a couple treetops * fix io device name in doc
1 parent 2bddb65 commit eb7f90e

File tree

12 files changed

+21
-15
lines changed

12 files changed

+21
-15
lines changed

.credo.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
{Credo.Check.Refactor.CyclomaticComplexity},
8484
{Credo.Check.Refactor.NegatedConditionsInUnless},
8585
{Credo.Check.Refactor.NegatedConditionsWithElse},
86-
{Credo.Check.Refactor.Nesting},
86+
{Credo.Check.Refactor.Nesting, max_nesting: 3},
8787
{Credo.Check.Refactor.UnlessWithElse},
8888

8989
{Credo.Check.Warning.IExPry},
@@ -106,4 +106,4 @@
106106
]
107107
}
108108
]
109-
}
109+
}

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Versioning](http://semver.org/spec/v2.0.0.html).
1010

1111
## [Unreleased]
1212

13+
### Changed
14+
15+
## [3.1.0] - 2019-02-25
16+
1317
### Changed
1418

1519
- `Timber.InvalidAPIKeyError` is now `Timber.Errors.InvalidAPIKeyError`
@@ -26,6 +30,7 @@ Versioning](http://semver.org/spec/v2.0.0.html).
2630
- Errors are no longer automatically parsed in the logger backend. Please use the
2731
[`:timber_exceptions`](https://github.com/timberio/timber-elixir-exceptions) library if you'd
2832
like to structure errors. This is a proper approach to structuring these events.
33+
- Handle unencodable content
2934

3035
## 3.0.0 - 2018-12-20
3136

@@ -57,4 +62,5 @@ Versioning](http://semver.org/spec/v2.0.0.html).
5762
expected
5863
- Removed the test event Mix task
5964

60-
[Unreleased]: https://github.com/timberio/timber-elixir/compare/v3.0.0...HEAD
65+
[Unreleased]: https://github.com/timberio/timber-elixir/compare/v3.1.0...HEAD
66+
[3.1.0]: https://github.com/timberio/timber-elixir/compare/v3.0.0...v3.1.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The result: Beautiful, fast, powerful Elixir logging.
2929

3030
```elixir
3131
defp deps do
32-
[{:timber, "~> 3.0"}]
32+
[{:timber, "~> 3.1"}]
3333
end
3434
```
3535

lib/mix/tasks/test_the_pipes.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ defmodule Mix.Tasks.Timber.TestThePipes do
3535
{:ok, _} = Application.ensure_all_started(:timber)
3636

3737
header = ~S"""
38-
^ ^ ^ ^ ^ ^ ___I_ ^ ^ ^ ^ ^ ^ ^
38+
^ ^ ^ ^ ^ ^ ___I_ ^ ^ ^ ^ ^ ^ ^
3939
/|\/|\ /|\/|\/|\ /|\ /\-_--\ /|\/|\ /|\/|\/|\ /|\/|\
4040
/|\/|\ /|\/|\/|\ /|\ / \_-__\ /|\/|\ /|\/|\/|\ /|\/|\
4141
/|\/|\ /|\/|\/|\ /|\ |[]| [] | /|\/|\ /|\/|\/|\ /|\/|\
@@ -116,7 +116,7 @@ defmodule Mix.Tasks.Timber.TestThePipes do
116116

117117
api_key = Config.api_key()
118118
message = "Testing the pipes (click the inspect icon to view more details)"
119-
log_entry = LogEntry.new(DateTime.utc_now(), "debug", message)
119+
log_entry = LogEntry.new(Timber.Utils.Timestamp.now(), :debug, message)
120120
log_map = LogEntry.to_map!(log_entry)
121121
body = Msgpax.pack!([log_map])
122122

lib/timber.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ defmodule Timber do
3535
3636
See `add_context/2`
3737
"""
38-
@spec add_context(Context.element()) :: :ok
38+
@spec add_context(map()) :: :ok
3939
def add_context(data, location \\ :local)
4040

4141
@doc """
@@ -44,7 +44,7 @@ defmodule Timber do
4444
The second parameter indicates where you want the context to be
4545
stored. See `context_location` for more details.
4646
"""
47-
@spec add_context(Context.element(), context_location) :: :ok
47+
@spec add_context(map(), context_location) :: :ok
4848
def add_context(data, :local) do
4949
LocalContext.add(data)
5050
end

lib/timber/config.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ defmodule Timber.Config do
6060
## Example
6161
6262
config :timber,
63-
debug_io_device: :stdout
63+
debug_io_device: :stdio
6464
6565
"""
6666
def debug_io_device do

lib/timber/contextable.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ defprotocol Timber.Contextable do
4646
@doc """
4747
Converts the data structure into a `Timber.Context.t`.
4848
"""
49-
@spec to_context(map() | list()) :: Timber.Context.element()
49+
@spec to_context(map() | list()) :: map()
5050
def to_context(data)
5151
end
5252

lib/timber/global_context.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ defmodule Timber.GlobalContext do
1515
@doc """
1616
Merges the provided context into the existing context
1717
"""
18-
@spec add(Context.element()) :: :ok
18+
@spec add(map()) :: :ok
1919
def add(context) do
2020
load()
2121
|> Context.merge(context)

lib/timber/http_clients/fake.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ defmodule Timber.HTTPClients.Fake do
5858
end
5959

6060
def wait_on_response(_ref, _timeout) do
61-
:pass
61+
{:ok, 200}
6262
end
6363

6464
def request(method, url, headers, body) do

lib/timber/local_context.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ defmodule Timber.LocalContext do
1616
`Timber.Context.add/2` is called to merge the existing context
1717
with the provided context.
1818
"""
19-
@spec add(Context.element()) :: :ok
19+
@spec add(map()) :: :ok
2020
def add(context) do
2121
load()
2222
|> Context.merge(context)

0 commit comments

Comments
 (0)