- Posts: 183
- Joined: Wed May 29, 2013 2:10 pm
- Location: Bracknell
Kognitio Console issues, advice, etc.
by MikeAtkinson » Tue May 16, 2017 4:50 pm
Looking through old feature requests for Console I came across one to add the ability to log all SQL statements executed within a script to a file. It turns out this is easy to do with KogScript.
Because KogScript uses the global function sql() to execute SQL we just replace it with another function of the same name, which also adds the logging.
Code: Select all
local x = sql logfile = "C:/TEMP/script.log"; function sql(s) local f = assert(io.open(logfile, "a+")) f:write(s .. "\n") f:close() x(s) end select * from ipe_user;
Who is online
Users browsing this forum: No registered users and 2 guests