I have a C++ application running on dozens of short-term cloud instances that sometimes, but rarely, needs to issue an alert due to some extraordinary failure. This requires some kind of remote application logging system, with a centralized server to wait for and accumulate the logs.
This isn't an uncommon need, tet, surprisingly, it's quite unclear how to proceed. Even after extensive googling, nearly all logging tools and discussion focus on forwarding system logs (often with rsyslog), not application data, or using very heavy, complex, and (often commercial) overkill tools like POCO, SPLUNK, and Log4cxx.
Currently I am embarassed to say, issuing system() wget http requests with my logging string embedded in the URL, and just parsing the server's HTTP log. I'd even continue doing this except for 1) the HTTP server is actually hosting more than just my log inputs, and 2) I can't send arbitrary strings since they have to be re-formatted to pass HTTP request length and character encoding limits.
Speed, scalability, and versatility are not too important. Simplicity is. I'm happiest with a single C++ header that exposes a single function that I provide an IP address and a plain ASCII string, and a server at that address merely concatinates all the strings it receives from all senders. Yet I cannot find such a simple system or even example.
My question to the community: What's the simplest C++ tool/header/library method for this barebones application logging requirement of "remote C++ application, very rarely, may send a single string to a server which merely concatinates all the strings it receives into a file."?
What I have tried:
My question to the community: What's the simplest C++ tool/header/library method for this barebones application logging requirement of "remote C++ application, very rarely, may send a single string to a server which merely concatinates all the strings it receives into a file."?