Before I code something cheap & cheerful (see below for how to do it), I will find out if there is not an existing (and more elegant) version of the wheel which I propose to (re)invent.
I am developing software for an embedded device with no display. It does have WiFI and I want to use this to get debug messages out of the device and visible on my laptop.
an Ajax API, taking at a minimum a single GET parameter, so that my embedded code can, for instance issue a request to
a web page which will display received trace log messages.
That's it for the "must have"s - simple, huh?
Nice to have:
different trace levels, e.g Error/Warning/Info which will be visually different on the web page
the ability to filter only certain trace levels
sort by severity or timestamp, in either direction
fancy dumping of data structures, not just a line of text
some form of security (not really necessary, if I only trace within my LAN)
anything else in the way of bells & whistles
The quick & dirty way to implement it is to have a single AJAX interface (PHP would be my choice, but feel free to use Node.Js or whatever you want, if CGI can handle it).
The AJAX takes a single text line as parameter and appends it, with timestamp, to a plain text file.
Rather than using PHP to display it, I would just use WinTail or similar, which constantly shows the last X (user defined) lines of a text file (normally a log file, which is continually growing).
That would get it done, but I'd rather find an existing implementation & concentrate on developing my embedded code.