Skip to content

Commit

Permalink
Gotta log each spacer line separately to ensure each is tagged
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Oct 7, 2012
1 parent 1a70499 commit d073116
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion railties/lib/rails/rack/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ def call(env)

def call_app(request, env)
# Put some space between requests in development logs.
Rails.logger.info "\n\n" if Rails.env.development?
if Rails.env.development?
Rails.logger.info ''
Rails.logger.info ''
end

Rails.logger.info started_request_message(request)
@app.call(env)
Expand Down

3 comments on commit d073116

@tenderlove
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this valuable information that needs to be logged? :trollface:

The aesthetic is not very pleasing to me:

I, [2012-11-09T11:10:04.739892 #56883]  INFO -- : Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2012-11-09 11:10:04 +0900
I, [2012-11-09T11:10:04.739935 #56883]  INFO -- : Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2012-11-09 11:10:04 +0900
I, [2012-11-09T11:10:04.744175 #56883]  INFO -- : 
I, [2012-11-09T11:10:04.744284 #56883]  INFO -- : 
I, [2012-11-09T11:10:04.744332 #56883]  INFO -- : 
I, [2012-11-09T11:10:04.744370 #56883]  INFO -- : 
I, [2012-11-09T11:10:04.744504 #56883]  INFO -- : Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2012-11-09 11:10:04 +0900
I, [2012-11-09T11:10:04.744580 #56883]  INFO -- : Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2012-11-09 11:10:04 +0900
I, [2012-11-09T11:10:04.748278 #56883]  INFO -- : 
I, [2012-11-09T11:10:04.748480 #56883]  INFO -- : 
I, [2012-11-09T11:10:04.748689 #56883]  INFO -- : 
I, [2012-11-09T11:10:04.748738 #56883]  INFO -- : 
I, [2012-11-09T11:10:04.748896 #56883]  INFO -- : Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-11-09 11:10:04 +0900
I, [2012-11-09T11:10:04.748942 #56883]  INFO -- : Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2012-11-09 11:10:04 +0900

@jeremy
Copy link
Member Author

@jeremy jeremy commented on d073116 Nov 9, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😢

We could suppress dev logging at the assets endpoint in dev?

@guilleiguaran
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeremy yes sir, it's on my TODO list 😃

Please sign in to comment.