Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Logging And Error Reporting #53

Closed
mike-thompson-day8 opened this issue Apr 24, 2015 · 2 comments
Closed

Fix Logging And Error Reporting #53

mike-thompson-day8 opened this issue Apr 24, 2015 · 2 comments

Comments

@mike-thompson-day8
Copy link
Contributor

At the moment, re-frame makes use of various logging functions like re-frame.utils/warn.

But functions in this ns are currently too hard coded and inflexible. There's been a couple of suggestions around improving that situation: #43 and #34

But everyone's idea about logging is different. And re-frame is too low level to be opinionated in this area.

I'm personally not keen on goog's logging but others like it and want to use it. And on IE you can't use console.group because it doesn't exist. Etc.

So I propose that re-frame has a bunch of standard reporting functions defined, each with a default implementation, but provides a way for apps to define their own implementation.

(re-frame.core/set-logging! my-warn my-log my-error my-group my-ungroup)

**Notice that error has been added to the list -- for exceptions.

These alternative implementations can then be as complicated as needed and use goog.logging as required.

@hura
Copy link

hura commented Apr 25, 2015

This is def the best possible solution. Let everybody plug in their own loggers and maybe give some recipes (wiki) for common loggers.
Don't have anything to add, just wanted to 👍

mike-thompson-day8 added a commit that referenced this issue Apr 26, 2015
@mike-thompson-day8
Copy link
Contributor Author

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

No branches or pull requests

2 participants