I am using tarantool/tarantool:2.6.0
Docker image (the latest at the moment) and writing lua scripts for the project. I try to find out how to see the results of callin' print()
function. It's quite difficult to debug my code without print() working.
In tarantool console print() have no effect also.
Using simple print()
Docs says that print() works to stdout
, but I don't see any results when I watch container's logs by docker logs -f <CONTAINER_NAME>
I also tried to set container's logs driver to local
. Than I get one time print to container's logs, but only once...
The container's /var/log
directory is always empty.
Using box.session.push()
Using box.session.push()
works fine in console, but when I use it in lua script:
-- app.lua
function log(s)
box.session.push(s)
end
-- No effect
log('hello')
function say_something(s)
log(s)
end
box.schema.func.create('say_something')
box.schema.user.grant('guest', 'execute', 'function', 'say_something')
And then call say_something()
from nodeJs connector like this:
const TarantoolConnection = require('tarantool-driver');
const conn = new TarantoolConnection(connectionData);
const res = await conn.call('update_links', 'hello');
Any suggestions? Thanx!