PaperTrail for electron


#1

Hey,
I was trying to integrate the https://github.com/barakwei/ParticlePapertrail with my Particle Electron project with no luck.
Went through the example and my electron is stuck on connecting to the cloud (blinking cyan).

I tried to build and flash the example from this repo with the same result as well.
I even tried this New library - Papertrail workaround with no luck.
No matter what, it stays blinking cyan.
Only when I comment out the (with my values)
PapertrailLogHandler papertailHandler(“logsX.papertrailapp.com”, 12345, “MyProject”);

The particle cloud connects and moves to breathing cyan, am I doing something wrong?
Or it just doesn’t really work well with electron running 0.6.2 firmware?

Thanks.


#2

Hello @shai 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 }
});