lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

The project I'm using LUA in with doesn't have stderr available. I've
been able to get around it by changing the lua _ALERT function to write
out to a log file instead.

Rather than changing the LUA code I'd like to change _ALERT to map to
my function instead. From reading the documentation, it appears that
settagmethod would be the way to go. I can't seem to figure out what I
should pass in for the the "tag" parameter. From looking over the list
archieves it seems that a tag(nil) is adequate but doesn't seem to be
working when called from C.

So I have something like this.

settagmethod (lua_tag(NULL), "_ALERT");

where myFunction is 
void myFunction (void);

The error dumped out to my log file looks is the following

lua error: `_ALERT' is not a valid event name
lua error: exit(1). Unable to recover.

I've poured over the documentation and source but I can't seem to find
anywhere in the documentation what else the tag parameter should be. 

Am I missing something plainly obvious? =)