Why doesn't it print hello?
$ redis-cli 127.0.0.1:6379> eval "print( 'hello' )" 0 (nil) 127.0.0.1:6379>
Launch 2.8.14 on Mac OS X, 2.8.12 on Windows 7.
I am calling in the Lua script from Jedis. To develop them is how to build a ship with a bottle, wear mittens, and someone hit me in the face. My ultimate goal is to somehow recreate a semi-functional development stack using the print trace, debug, whatever commands.
My workaround for my Lua script is a Redis list called "log" returning it to Jedis and then dumping the contents. Kind:
redis.call( 'del', 'log' ) redis.call( 'rpush', 'log', 'trace statement 1' ) redis.call( 'rpush', 'log', 'trace statement 2' ) ... redis.call( 'lrange', 'log', 0, -1 )
Thanks in advance for any advice, help, etc.
Update: I just noticed that "hello" displays through the terminal window for the redis-server executable. Smart. So now I am each terminal for redis server, redis-cli interactive and redis-cli.
Update 2: it turned out that I can print the trace instructions on the redis-cli monitor as follows:
eval "redis.call( 'echo', 'ugh')" 0
Which would look like this:
123.456 [0 127.0.0.1:57709] "eval" "redis.call( 'echo', 'ugh')" "0" 123.456 [0 lua] "echo" "ugh"
lua redis jedis
Jason osgood
source share