BoxLang 🚀 A New JVM Dynamic Language Learn More...

Bugsnag

v0.3.0 Modules

Bugsnag Error Notification for Coldbox

Log your Coldbox errors using Bugsnag and the Bugsnag Notify API.

Configuration

At minimum, you will need a Bugsnag API key. You can get this from the Bugsnag Dashboard Settings page.

In /config/Coldbox.cfc's configure() method, add bugsnag.apiKey setting to the moduleSettings struct like so:

function configure(){
    moduleSettings = {
        bugsnag = {
            ApiKey: "PLEASE_SET_ME"
        }
    };
}

The following settings are available:

moduleSettings = {
    bugsnag = {
        "ApiKey": "REQUIRED",
        // is this app in development, staging, or production?
        "releaseStage": "development",
        // only notify for these environments
        "notifyReleaseStages": ["development","staging","production"], // NOT IMPLEMENTED
        // automatically log items using a Logbox appender
        "enableLogBoxAppender" = true,
        // Min/Max levels for appender
        "levelMin" = "FATAL",
        "levelMax" = "INFO",
        // automatically log exceptions via onException interception event
        "enableExceptionLogging" = true,
        // Data sanitization, scrub fields and headers, replaced with * at runtime
        "scrubFields" 	= [],
        "scrubHeaders" = []
    }
};

TODO

  • Follow Bugsnag integration guidelines
  • Allow apps to set user and context data per request, to be logged with any errors
  • Write tests for BugsnagService and BugsnagAppender

The Good News

For all have sinned, and come short of the glory of God (Romans 3:23)

But God commendeth his love toward us, in that, while we were yet sinners, Christ died for us. (Romans 5:8)

That if thou shalt confess with thy mouth the Lord Jesus, and shalt believe in thine heart that God hath raised him from the dead, thou shalt be saved. (Romans 10:9)

Repository

Copyright 2019 (and on) - Michael Born

$ box install bugsnag

No collaborators yet.
     
  • {{ getFullDate("2019-04-10T09:17:53Z") }}
  • {{ getFullDate("2019-04-11T19:49:43Z") }}
  • 2,343
  • 2,365