If I am POSTing logs to a thing, why would that thing be your program and not, say, Logstash's HTTP input or even direct to an Elasticsearch cluster?
Do I really want to POST logs? What if the logging endpoint is not available? Don't I want log delivery uncoupled from the application, so logging failures don't become application failures?