Results 1 to 2 of 2

Thread: read girder's logs with LUA

  1. #1
    Join Date
    Oct 2009
    Posts
    10

    Default read girder's logs with LUA

    Hello,
    I am trying to read girder's log and send the content to an LCD.
    Is it possible to do a such thing with LUA ? (second part shouldn't be a problem)

    but how can I send girder's log content to a variable ?

    Any idea ?

    Thanks in advance.
    brik

  2. #2
    Join Date
    Oct 2009
    Posts
    10

    Default

    OK...I found the payloads argument for event.exe

    then get data back with this script :

    function MyCallback(event, device, mod, payloads, id)
    print(event); print(device); print(mod)
    for i=1, 4 do print(payloads[i]) end
    end
    MyCallbackID = gir.AddEventHandler(".*", 18, 18, MyCallback)
    -- And later in cleanup code:
    gir.RemoveEventHandler(MyCallbackID); MyCallback = nil; MyCallbackID = nil

    That's all I needed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •