ParticleWebLog (community library)


Name Value
Name ParticleWebLog
Version 1.0.4
Installs 8162
License MIT
Download .tar.gz
All Versions 1.0.4, 1.0.3, 1.0.1, 1.0.0

Sends logs to the Particle servers via publish This provides remote logging with a very tiny memory footprint. Logs can be viewed in the Particle console or use the Particle webhook feature to send those log messages to the logging service of your choice (such as

Library Read Me

This content is provided by the library maintainer and has not been validated or approved.


A Particle library for remote logging via publish(). And example config for

I wrote this tiny logging framework because I wanted something that would allow remote logging but use very little FLASH space.

Other benefits:

  • Messages are not sent in cleartext (they are inside the particle encrypted link).
  • Because this library doesn't use UDP, it is probably a more resistant to carrier throttling on cellphone networks (i.e. for the Electron)


#include "ParticleWebLog.h"
ParticleWebLog particleWebLog;

void setup() {"Hi I'm a log message");

void loop() {

See the examples folder for more details.


This library merely registers a log provider that publishes each logged string as a particle publish event. The events will be published using the name of your choice (defaults to "log").


  • This tiny library is built on top of Particle.publish, so you should not print log message too quickly if you are using it. It might drop messages if you send more than about 1 a second.
  • Third generation particle devices have lots of log messages from the system some of which seem to come out before publishing is legal. So this log provider only logs "app" messages.

Using web logging services

One of the great things about this approach is that the web service has good webhook support. So you can squirt these crude log messages to a nice storage/viewer service. Most any service that has a way to accept HTTP posts of log messages should work. Here is an example using

  • Go to and create a free account (you can pick any domain name).
  • Go to the console for your domain: and setup an HTTPS log source. It will give you an URL that looks approximately like this:
  • Go to the web console and click on "Integrations / New Integration / Webhook".
  • On the form it shows, enter "log" for Event Name, the URL you were provided above, change the request format to JSON.
  • Then click to enter custom JSON data and paste in the following:
    "message": "",
    "from": "",
    "published_at": "",
    "userid": "",
    "fw_version": ""
  • Click "save" to save your new integration.
  • In the top right of the integration you should now see a "Test" button. You can click it to test that the Particle server is now able to talk with Loggly.
  • Any new log publishes from your device should now be stored in Loggly.


I will happily accept pull requests and respond to issues raised in github.

Thanks to @barakewi for his Papertrail library which was used as a template to create this library.


Copyright 2019

Licensed under the license

Browse Library Files