Skip to content

Conversation

@jsaak
Copy link
Contributor

@jsaak jsaak commented Nov 29, 2013

After my first attempt to format log exceptions, i found out that there are four places in goliath where it should be used. So i added a log_exception(e) conveninece method to env. And modified all four places to use it. As a bonus the user can use it too.

@igrigorik
Copy link
Member

Consistent log_exception makes sense, but I'm not sure we need to (or should even) expose it to the user -- this is internal plumbing.. and they have direct access to the logger anyway?

@jsaak
Copy link
Contributor Author

jsaak commented Nov 29, 2013

if you know a better place to put it, i do not mind moving it

btw, i feel this is mainly log4r territory, and they support this with %M in the PatternFormatter
which uses this function to format all error messages:
https://github.com/colbygk/log4r/blob/master/lib/log4r/formatter/formatter.rb#L70

i just did not want to slow down logging
(and i do not like their exception formatting, but thats another story)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants