elixir-reverse-proxy icon indicating copy to clipboard operation
elixir-reverse-proxy copied to clipboard

Logging?

Open youroff opened this issue 8 years ago • 3 comments

Would be nice to have any logging. I'm trying to pass unrecognized routes to the legacy backend, and so far it only spits out 502 and never tries to hit that backend: forward "/", ReverseProxy, upstream: ["localhost:3000"] Also, if I pass upstream with scheme, as "http://localhost:3000", it throws:

** (exit) an exception was raised:
    ** (ArgumentError) argument error
        :erlang.list_to_integer([])
        (hackney) /Users/youroff/projects/autocloud/auto_cloud/deps/hackney/src/hackney_url.erl:204: :hackney_url.parse_netloc/2
        (hackney) /Users/youroff/projects/autocloud/auto_cloud/deps/hackney/src/hackney.erl:331: :hackney.request/5
        (httpoison) lib/httpoison/base.ex:432: HTTPoison.Base.request/9
        lib/reverse_proxy/runner.ex:24: ReverseProxy.Runner.retreive/3

Any ideas how to fix this?

youroff avatar Jul 21 '17 19:07 youroff

Seems like it's the obscure problem with Hackney :( Though Logging would be still appreciated.

youroff avatar Jul 21 '17 20:07 youroff

Sorry for the delay @youroff! I agree on the logging. I'll work on getting something in the library for tracing, but as always, PRs are welcome.

slogsdon avatar Aug 03 '17 02:08 slogsdon

Thanks for the reply! Sure, I'll come up with PR bit later ;)

youroff avatar Aug 03 '17 02:08 youroff