New library - Papertrail

Hello @thrmttnw @syrinxtech @barakwei @rickkas7 Firmware 0.8.0-rc.3 Pre-release is out on the Web IDE for Core/Photon/P1/Electron. This release fixes the issue seen above where recursive logging would lock up the application thread on the Electron. It’s still not advisable to log too much over UDP on the Electron. I’ll suggest two that work well below. Please see the release notes on the Particle Firmware Updates Thread

// app level over papertrail
PapertrailLogHandler papertrailLogHandler1(PAPERTRAIL_HOSTNAME, PAPERTRAIL_PORT, "MyAppName", System.deviceID(),
    LOG_LEVEL_NONE, {
    { "app", LOG_LEVEL_ALL }
    // TOO MUCH!!! { "system", LOG_LEVEL_ALL },
    // TOO MUCH!!! { "comm", LOG_LEVEL_ALL }
});

// system info and app level over papertrail
PapertrailLogHandler papertrailLogHandler2(PAPERTRAIL_HOSTNAME, PAPERTRAIL_PORT, "MyAppName", System.deviceID(),
    LOG_LEVEL_NONE, {
    { "app", LOG_LEVEL_ALL },
    { "system", LOG_LEVEL_INFO }
    // MAYBE { "comm", LOG_LEVEL_INFO }
});
1 Like