stackvana / hook.io

Open-Source Microservice Hosting Platform
https://hook.io
Other
1.27k stars 119 forks source link

Better lua support #266

Open Marak opened 7 years ago

Marak commented 7 years ago

We've been getting a few requests for better lua support.

So far we have:

We should:

@teamflower -

Do you have any additional suggestions for improving Lua support? This is a good place to bring them up.

teamflower commented 7 years ago

Thanks, @Marak. Some guidance or improvements on using logging with Lua would be helpful: https://hook.io/logs

Just a couple example lines for Lua on the page would be 🎉 Not sure where to start.

Marak commented 7 years ago

@teamflower -

So it's technically possible to do this right now using something like:

io.stderr:write('{ "type": "log", "payload": { "entry": "hello logs"}}')

That should send "hello logs" to the service logs. In addition to the above listed items, I'm going to write a convenience method for the lua services called log that will automatically wrap the above statement into a single function.

Thanks for the suggestion!