0

My config ~/.iex.exs is :

IEx.configure(inspect: [limit: :infinity, printable_limit: :infinity, pretty: true , safe: false] )

In IEx, strings, lists are not truncated, but despite the configuration ,I have some errors troncated like :

19:35:15.338 [error] #PID<0.404.0> running HTTP (cowboy_protocol) terminated
Server: localhost:4201 (http)
Request: GET /api?elemen_id%5B%5D=FOO_1&elemen_id%5B%5D=FOO_2&*********************************** (truncated)

If someone have a good idea !

Thanks !

EMottet
  • 310
  • 1
  • 3
  • 14
  • 2
    You probably need to configure the `logger` application https://hexdocs.pm/logger/Logger.html#module-runtime-configuration – m3characters Jun 25 '19 at 20:34

1 Answers1

1

inspect: option of IEx.configure/1 does indeed configure IEx

A keyword list containing inspect options used by the shell when printing results of expression evaluation. Default to pretty formatting with a limit of 50 entries.

It does affect the default options of Inspect protocol implementation. Errors come as binaries from what formatted this error already truncated. The message comes from cowboy which apparently uses error_logger by default. So, the message might be initially truncated by error_logger or, as specified in comments by @m3characters by Logger application.

The easiest approach I’d suggest is to config cowboy to use Logger application and then to config Logger to not truncate messages by default (use :infinity as limit.) Maybe the latter step only would suffice.

Aleksei Matiushkin
  • 119,336
  • 10
  • 100
  • 160