Thanks for your help, it is very helpful for me. I would to know if I can do the same thing as error function in process_message ?
Cordialement, --- Djamel FELLAH Tél : +33 6 26 68 57 09 Élève Ingénieur en Informatique École Université de Technologie de Belfort-Montbéliard On 14 January 2015 at 21:18, Rob Miller <[email protected]> wrote: > 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

