Skip to content

Add support for ignoring console logging levels #251

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

Closed
wants to merge 6 commits into from
Closed

Add support for ignoring console logging levels #251

wants to merge 6 commits into from

Conversation

dancrumb
Copy link

Users just add a pluginOptions object to the Raven object:

Raven.config(/*...*/).install().pluginOptions = {
    console: {
        ignoreLevels: ["info", "debug"] // just the facts, ma'am
    }
}

@mattrobenolt
Copy link
Contributor

Just throwing this out there for discussion? Is it a bad idea to use just a magic global for this? Or is that not a great idea.

I'm imagining a general "logging config" or something like exists in other languages.

I also don't write JavaScript much, which is why I'm asking. This just looks and feels really sketchy and I'm not sure of the best practices.

@dancrumb
Copy link
Author

Since Raven is designed to run in entirely unknown environments then I
think the number of globals should be limited to the absolute minimum.

While I see where you're coming from for with regard to a general logging
config, in the browser, your pretty much limited to console for out of
band logging (i.e. not writing to the document.

I think you're right that it's a little sketchy. We're relying on users
glomming a configuration object onto Raven. However, the plugins are a
little loosey goosey at the moment anyway: no documentation of specific
plugins or the general plugin framework.

I'd be happy to spend some time on that, but right now, I'm keen to just be
able to tweak the console reporting so that I don't get rate limited to
oblivion
On Aug 28, 2014 5:53 PM, "Matt Robenolt" [email protected] wrote:

Just throwing this out there for discussion? Is it a bad idea to use just
a magic global for this? Or is that not a great idea.

I'm imagining a general "logging config" or something like exists in other
languages.

I also don't write JavaScript much, which is why I'm asking. This just
looks and feels really sketchy and I'm not sure of the best practices.


Reply to this email directly or view it on GitHub
#251 (comment).

@mattrobenolt
Copy link
Contributor

That's fair. I'd like to have more attention into plugins in general.

If this solves the immediate issue you have, I'm ok with it since it doesn't change anything in raven.js itself and is purely isolated to the console plugin which very few people (afaik) use.

I'd be very open to seeing a proposal for a new setup going forward.

@mattrobenolt
Copy link
Contributor

@dancrumb One last thing, can you rebase and squash these commits? You now have 4 extraneous commits that'll get merged with this. :)

@mattrobenolt
Copy link
Contributor

@dancrumb Just waiting on a rebase/squash here and it should be good to go.

@QuentinFchx
Copy link

ETA ? :)

@dancrumb
Copy link
Author

dancrumb commented Mar 6, 2015

I created #328 to replace this

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.

3 participants