H4P_RemoteLogger registers a handler function with a selected set of events, which are saved to sent to a remote url as POST request with application/x-www-form-urlencoded data fields.
For information on how to use this plugin, see Everything is an event: Listeners, Emitters and Handlers
The data fields' names will need to be known by the remote server's POST handler.
- device
- type
- source
- msg
H4P_RemoteLogger myLL(...This plugin is a "singleton" - there may be only one single instance of it in the app. It may be instantiated as any name the user chooses.
N/A
stop / start have no effect
N/A
/* constructor
// url remote server format "http://host:port/path/?a=b..." can start https://. port, path, query all optional
// e.g. "http://myserver.local:1883"
filter; // Name of the event (or combination of events) to be written to the log
*/
H4P_RemoteLogger(const string& url,uint32_t filter=H4PE_ALL);See also MySQL event logger github repo for a NodeJS / Express demo webserver which will process the events sent by H4P_RemoteLogger and store them in a MySQL database
(c) 2021 Phil Bowles h4plugins@gmail.com
