rollbar / rollbar-php-wordpress

Official WordPress plugin from Rollbar, Inc.
https://rollbar.com/
GNU General Public License v2.0
15 stars 20 forks source link

Ability to append php logging config with filter #36

Closed jbrunemann closed 6 years ago

jbrunemann commented 6 years ago

Would be great if one can use a wp filter, rollbar_php_config for example, to append the config used by the init function. Or is there a better way to add config elements to the Rollbar instance used by this plugin?

ArturMoczulski commented 6 years ago

@jbrunemann this is possible with just plain rollbar-php: \Rollbar\Rollbar::logger()->configure(). Just make sure you call it after plugins_loaded hook.

I'm working right now on extending the UI to allow setting up all of the configuration options from the UI though.

ArturMoczulski commented 6 years ago

@jbrunemann Actually, I can see how that can be confusing. Although my comment above is the way to do it, it's kind of difficult to know where is the best place to invoke \Rollbar\Rollbar::logger()->configure().

I have an idea how to make this more developer and user friendly.