Adding Elixir logger

RE - https://github.com/phoenixframework/phoenix/issues/235

@chrismccord I need to test this, as well as add the stacktrace to the logger.error, still but this is the basic start. Once https://github.com/elixir-lang/plug/pull/75 gets merged or something like it I can complete this.
Awesome thanks for the feedback jose!! I will make these changes later
tonight.


On Tue, Aug 19, 2014 at 6:21 AM, José Valim <notifications@github.com>
wrote:

> In lib/phoenix/plugs/router_logger.ex:
>
> > -      diff = after_micro - before_micro
> > -      before = localtime_ms(before_stamp) |> format_time
> > -
> > -      #if we micro gets too big then use ms
> > -      resp_time =  if diff > 1000 do
> > -        "#{div(diff, 1000)}ms"
> > -      else
> > -        "#{diff}µs"
> > -      end
> > -      log(level, before, resp_time, conn)
> > +  def call(conn, _level) do
> > +    Plug.Conn.register_before_send(conn, fn (conn) ->
> > +      #Show the error message if they didn't process response type. Instead of blowing up.
> > +      {_status, content_type} = Phoenix.Controller.Connection.
> response_content_type(conn)
> > +      Logger.debug """
> > +      Processing by #{controller_module(conn)}.#{action_name(conn)}
>
> inspect controller_module(conn) so we don't see the Elixir. prefix in
> logs.
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/phoenixframework/phoenix/pull/238/files#r16408349>.
>