https://github.com/kronicdeth/interpret_logger_call
A bug reproduction repo
https://github.com/kronicdeth/interpret_logger_call
Last synced: 7 months ago
JSON representation
A bug reproduction repo
- Host: GitHub
- URL: https://github.com/kronicdeth/interpret_logger_call
- Owner: KronicDeth
- Created: 2018-03-07T04:33:38.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-07T04:35:23.000Z (over 7 years ago)
- Last Synced: 2025-01-14T08:27:08.185Z (9 months ago)
- Language: Elixir
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# InterpretLoggerCall
A bug reproduction repo
## Bug description
Logger calls (such as `Logger.info`) that take an anonymous function that contains a string that performs interpolation
cannot be debugged using `:debugger`, IntelliJ Elixir or the Elixir Language Server that all use the `:int` OTP module
to interpret modules to perform line-based debugging.Logger calls containing interpolation raise an `ArgumentError` when the module is interpreted.
## Bug reproduction
### Without interpretation
No bug when code is not interpreted
```
mix test
```outputs
```
..
22:22:40.708 [info] 1
.
22:22:40.708 [info] 1
.Finished in 0.02 seconds
4 tests, 0 failures
```### With interpretation
Bug when code is interpreted
```
INT=1 mix test
```outputs
```
..
22:22:47.931 [info] 11) test log_interpolation/0 (InterpretLoggerCallTest)
test/interpret_logger_call_test.exs:18
** (ArgumentError) argument error
stacktrace:
(interpret_logger_call) Elixir.InterpretLoggerCall.erl:17: anonymous fn/4 in InterpretLoggerCall.log_interpolation/0
(interpret_logger_call) Elixir.InterpretLoggerCall.erl:17: InterpretLoggerCall.log_interpolation/0.
Finished in 0.05 seconds
4 tests, 1 failure
```