FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

Pusher Monitor & LogBox Appender

v1.1.1 Public

Pusher Monitor & LogBox Appender

Setup & Installation

box install nsg-module-pusher

Getting started get a free pusher account at www.pusherapp.com. To use the module, point your browser to http://{{domain}}/pusher and the handler will show you a real-time none persistant log viewer.

Add the following structure to Coldbox.cfc

pusher = {
    appID           = "{{pusher_app_id}}",
    pusherChannel   = "logBox",
    pusherAppKey    = "{{pusher_app_key}}",
    pusherAppSecret = "{{pusher_app_secret}}"
}

LogBox Appender

An example appender setup could look like this

    logBox = {
        // Define Appenders
        appenders = {
            pusherAppender = {
                class = "modules.nsg-module-pusher.appenders.pusherAppender",
                properties = {
                    appID           = "{{pusher_app_id}}",
                    pusherChannel   = "logBox",
                    pusherAppKey    = "{{pusher_app_key}}",
                    pusherAppSecret = "{{pusher_app_secret}}"
                }
            },
            coldboxTracer = { class="coldbox.system.logging.appenders.ConsoleAppender" }
        },
        // Root Logger
        root = { levelMin="FATAL", levelMax="ERROR", appenders="*" }
    };

Dependencies (0)


Dev Dependencies (0)


1.) add the appender to the Coldbox.cfc

logBox = {
appenders = {
PusherAppender = {
class="modules.pusher-monitor.appenders.PusherAppender",
properties={
channel    = "{{Channel_Name}}",
id  = "{{Pusher App ID}}",
key          = "{{Pusher Key}}",
secret  = "{{Pusher Secret"
}
}
},
root = { levelMin="FATAL", levelMax="ERROR", appenders="*" }
};

2.) configure your ModuleSettings.cfc to include the same pusher channel, id, key, & secret as the appender.
settings = {
pusher = {
channel = "LogBox",
id = "{{Need Pusher App_ID}}",
key = "{{Need Pusher Key}}",
secret = "{{Need Pusher Secret}}"
}
};

3.) watch the logs flow in
v.1.1.1 :: small bug fix - added enhanced sorting & better jquery filtering
v1.1.0  :: upgrades to ColdBox Modules
v1.0.0  :: initial commit

 

$ box install nsg-module-pusher

No collaborators yet.
 
  • Dec 21 2012 07:13 PM
  • Jun 10 2016 02:28 AM
  • 2,792
  • 1,399
  • 5