Export event log


#1

I’m new to Particle so I hope this question won’t embarrass me too much. Entries in the Event Log clear whenever I log out of the Console, shut down my computer or switch devices. How can I retain a running log for as long as I want? Can I export the log as either a csv file Excel spreadsheet for archiving purposes?


#2

The Particle Console does not retain your events at all and I’m unaware of an export feature.
It should just be considered a viewer for live events but isn’t actually logging.
If you want the logs retained, you’ll need to have a client subscribe to the events and log them for you.

You can use CLI for that like particel subscribe > log.txt (in Windows)


#3

Thanks ScruffR! Not the answer I was hoping for, but luckily I have a Mac Mini that runs 24/7 to manage my security system, so I’ll just open a browser window to “watch” the log continuously. I don’t know how many events will be visible in such a continuous log; do you?


#4

Also, check out the paper trail integration. It’s in the doc’s under the logging class. With paper trail, your logs are sent off to the paper trail website where you can view them for up to 7 days with the free plan. I found it to be invaluable while debugging far-off photons.


#5

That sounds very interesting, Tim, but I can’t find the document you mention (likely looking in the wring docs folder). Can you post the URL?

Brian Shaw


#6

Sorry for lack of URL last night… that’s what you get when I’m on my phone. The Logging I mentioned is in the Device OS API documentation under “Logging”. The papertrail service is specifically mentioned under “Community Log Handlers” here: https://docs.particle.io/reference/device-os/firmware/photon/#community-log-handlers


#7

Great! Got it, and thanks!