Commit Graph
500 Commits
Author SHA1 Message Date
José Valim 09dcbf7566 Introduce deprecations scheduled for Elixir v1.20 2025-06-07 21:55:06 +02:00
José Valim b1053b75c5 Use binary appending now that we require Erlang/OTP 26
Prompt
======

There is a format/2 function in inspect/algebra.ex that
calls format/3 recursively that returns a list of binaries.
Instead of doing so, I want you to pass a binary as accumulator,
<<>>, and then instead of `[head | format(...)]`, on every
operation you will do `format(<<acc::binary, result::binary>>, ...)`.

Notes
=====

The assistant was able to detect an issue with `collapse/4`
but it was unable to fix it. That and the changes to
mix/tasks/format.ex were addressed manually.
2025-06-07 12:46:47 +02:00
Rudolf Manusadzhian 9938105fb4 Fix tiny typo in Logger docs (#14527) 2025-05-24 15:29:17 +09:00
José Valim 920a6a0a42 Consistenly apply timeouts across suites (#14444)
Closes #14443.
2025-04-18 12:11:12 +02:00
Santiago Tortosa db6c536c30 Doc ref to inspect/2 for :translator_inspect_opts (#14420) 2025-04-10 11:15:40 +02:00
Jonatan Männchen f3e8ceb5aa Implement Test Coverage Reporting (#14343) 2025-04-07 22:37:01 +02:00
José Valim a87eb7dec4 Avoid collectable deprecation warning 2025-04-01 18:21:58 +02:00
Alex Martsinovich 884de18a7a Preserve logger reports through translation by encapculating translated output in report_cb (#14380) 2025-04-01 18:16:04 +02:00
Alex Martsinovich edd2944bea Drop otp log events if handle_otp_reports is set to false (#14354) 2025-03-22 21:46:20 +01:00
José Valim d661840e5e Improve docs on custom handlers 2025-03-11 20:09:34 +01:00
Jonatan Männchen 980500551c Inline Licence Info & Copyright for non-test files (#14256) 2025-02-07 21:11:09 +01:00
Jonatan Männchen f7bbe81ea7 Inline licence info & copyright for test files (#14257) 2025-02-07 20:54:14 +01:00
José Valim 80aad3585c Ensure logger suite passes when IO.ANSI colors is disabled 2025-02-01 10:53:44 +01:00
José Valim cff55fbc88 Compute ANSI escaping lazily in Logger, closes #14248 2025-02-01 10:33:47 +01:00
José Valim 098c01a7ee Introduce deprecations scheduled for v1.19 2024-12-11 11:59:36 +01:00
peter madsen-mygdal 8994297ec6 Fix typo (#14033)
peformant -> performant
2024-12-05 19:02:43 +01:00
José Valim b75cccc8df Describe why Logger.flush is not advised in production 2024-12-05 13:10:58 +01:00
José Valim 485ca72ae2 Infer types and use them across remote calls (#13981)
This also unifies handling of deterministic builds with Erlang/OTP
as well as warnings_as_errors.
2024-11-09 18:00:27 +01:00
Jean Klingler fbeccf9681 Clarify that charlists cannot be used as logger metadata (#13977) 2024-11-07 16:26:48 +09:00
felipe stival 4c7e723bec Fix Logger.put_process_level/2 note (#13959)
The documentation for this function stated that it would override
primary logger level, which is not true.
2024-11-05 11:51:45 +01:00
José Valim 0a694164dc Clarify Logger formatter docs, closes #13962 2024-11-05 11:51:16 +01:00
José Valim 0c75027e1f Optimize bare_log invocation (#13956) 2024-11-03 15:44:35 +01:00
Tobias PfeifferandAndrea Leopardi 6cd46d76ee Improve docs for Logger overload protection (#13855)
The previous docs didn't mention that logger may drop messages
entirely. This should give a fair overview of the built-in overload
protections, similar to erlang/otp#8855.

---
Co-authored-by: Andrea Leopardi <an.leopardi@gmail.com>
2024-09-24 17:15:29 +02:00
Gonzalo 357793a6f0 Fix Logger docs layout (#13840) 2024-09-19 20:24:21 +02:00
Igor Goryachev 0d4d1e3db1 Fix logger translator tests under Erlang 27.1 (#13839) 2024-09-19 12:57:48 +02:00
Andreas Lappe 6d44df6573 Fix typo in docs of logger.ex (#13835) 2024-09-17 19:09:42 +02:00
Jean Klingler 1286a6257f Replace unless/2 usages in the codebase (#13808) 2024-09-06 16:22:51 +09:00
José Valim 17a01309e0 More improvements to Logger metadata 2024-08-12 14:31:55 +02:00
Krapaince db72cdd5a8 Add required conditions for Logger's metadata to be print (#13777) 2024-08-12 14:24:56 +02:00
José Valim 8f24d452b4 Improve Logger docs, closes #13749 2024-08-02 09:13:38 +02:00
Jean Klingler 2eb85eaf4b Fix logger crash when :gen_statem format_status/2 returns non-tuple (#13684) 2024-06-22 20:14:09 +09:00
José Valim 25e6ce4271 Add pending deprecations 2024-05-24 13:11:29 +02:00
José Valim 69999ec013 Clarify the data types of the metadata options
Closes #13546.
2024-05-08 22:10:06 +02:00
José Valim b378a2d560 Ensure translators are persisted across logger restarts 2024-05-01 11:35:01 +02:00
David JULIEN c5816a227f Add :all and :none for Logger.level/0 (#13513)
According to https://www.erlang.org/doc/man/logger#get_primary_config-0 and https://www.erlang.org/doc/man/logger#type-primary_config,
returned type for `:logger.get_primary_config` is:

```erlang
 #{level => level() | all | none,
   metadata => metadata(),
   filter_default => log | stop,
   filters => [{filter_id(), filter()}]}
```

Thus, inside `Logger.level/0` fun, `level` could also be `all` and `none` when calling:

```elixir
%{level: level} = :logger.get_primary_config()
```
2024-04-26 12:29:52 +02:00
felipe stival b0dbfa7ac6 Add @doc :since to Logger.{get, put, delete}_process_level/2 (#13508) 2024-04-23 08:22:08 +02:00
Cameron Duley 70391199a4 Translate :gen_statem termination reports (#13451) 2024-04-03 10:59:21 +02:00
Jean Klingler 40f5374c2b Log process label in GenServer and :gen_event crash report (#13424)
* Log process label in :gen_event crash report

* Log process label in GenServer crash report

* Simplify existing tests

* Use inspect opts when inspecting label
2024-03-20 22:22:23 +09:00
Jean Klingler 349321117e Log :$process_label in Task crash report (#13406) 2024-03-16 19:05:47 +09:00
José Valim e0ad0c020b Fix warnings in test suite 2024-03-14 22:05:20 +01:00
Jean Klingler 15586e2fb0 Logger logs :process_label if present (#13396) 2024-03-06 20:53:43 +09:00
Jean Klingler 4f66663e06 Logger handles :process_label from OTP27 (#13392) 2024-03-05 22:31:05 +09:00
José Valim c3ed7bb2e5 Improve Logger docs, closes #13313 2024-02-02 15:28:54 +01:00
José Valim bfd1330d16 Handle invalid :time in metadata, closes #13190 2023-12-29 16:29:36 +01:00
Zeke Douandc4710n 1ef9eaf900 Add Logger.levels/0 (#13136)
Co-authored-by: c4710n <c4710n@users.noreply.github.com>
2023-11-23 15:08:31 +01:00
Andrea Leopardi 374a2e1c6f Add missing @spec to some Logger functions (#13140) 2023-11-23 13:15:51 +01:00
Andrea Leopardi f547a752fc Fix typo in Logger docs 2023-11-23 12:08:39 +01:00
José Valim dfbb61b45b Improve Logger docs, closes #13119 2023-11-22 09:23:17 +08:00
Marco Milanesi a346c4f428 Add metadata examples to logger documentation (#13064) 2023-11-02 12:45:18 +01:00
José Valim 7ff58d75f5 Fix warnings and messages on Erlang/OTP 25 2023-10-31 08:02:15 +01:00