You can't write to stderr (or stdout) directly from a Lua sandbox, the very nature of
"sandbox" is that we're limiting direct access to the underlying system.
Instead, you have interact using APIs that Heka provides.
In this case, you can achieve what you want with the error function, see
https://github.com/mozilla-services/heka/blob/dev/sandbox/lua/filters/stat_graph.lua#L92.
-r
On 01/14/2015 10:52 AM, djamel wrote:
I want to write some message on *stderr* if I catch an error when my
plugin starts (for example when config is invalid).
I tried to use |io.stderr:write('message')|, in order to display a text
message, but I couldn't import the |io|library.
What is the recommended way to log error message from heka lua sandboxes ?
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka