MxBlog

Sending Mendix logs to a tcp port

You can configure your mendix runtime to send loglines to a tcp port. Here's an example;

curl -H "Accept: application/json" \
       -H "Content-type: application/json" \
       -H "X-M2EE-Authentication: ZTUxMGZhYzQtNTBjMS00M2Q4LWI0ZmMtNDg2ZDkwOWRmZTc3“ \
       -X POST \
       -d "{'action': 'create_log_subscriber', 'params': {'type': 'tcpjson', 'name': 'TCPJSONLog','autosubscribe': 'TRACE', 'host': '127.0.0.1', 'port':31337}}" \
      http://localhost:8090/

To see all loglines in a shell prompt, start netcat as follows:

nc.exe -l -p 31337