IEx 截断错误堆栈跟踪尽管配置
IEx truncated Error stackstrace despite of config
我的配置 ~/.iex.exs
是:
IEx.configure(inspect: [limit: :infinity, printable_limit: :infinity, pretty: true , safe: false] )
在 IEx 中,字符串、列表不会被截断,但是尽管进行了配置,我还是有一些错误被截断,例如:
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)
如果有人有好主意!
谢谢!
inspect:
option of IEx.configure/1
确实配置 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.
它确实会影响 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 的默认选项。因此,该消息可能最初被 error_logger
截断,或者正如 Logger
应用程序在 @m3characters 的评论中所指定的那样。
我建议的最简单方法是配置 cowboy
以使用 Logger
应用程序,然后配置 config Logger
以默认不截断消息(使用 :infinity
作为限制。)也许只有后一步就足够了。
我的配置 ~/.iex.exs
是:
IEx.configure(inspect: [limit: :infinity, printable_limit: :infinity, pretty: true , safe: false] )
在 IEx 中,字符串、列表不会被截断,但是尽管进行了配置,我还是有一些错误被截断,例如:
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)
如果有人有好主意!
谢谢!
inspect:
option of IEx.configure/1
确实配置 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.
它确实会影响 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 的默认选项。因此,该消息可能最初被 error_logger
截断,或者正如 Logger
应用程序在 @m3characters 的评论中所指定的那样。
我建议的最简单方法是配置 cowboy
以使用 Logger
应用程序,然后配置 config Logger
以默认不截断消息(使用 :infinity
作为限制。)也许只有后一步就足够了。