When executing an eval script from a remote location.
How can we log so we can evaluate what is happening?
local name = KEYS[1]
local key = KEYS[2]
local desired = ARGV[1]
local expecting = ARGV[2]
local expires = ARGV[3]
local channel = ARGV[4]
local message = ARGV[5]
redis.log(...) ?
And where does such logs go? How can they be viewed?
asked Jun 27, 2021 at 18:58
1 Answer 1
If you configured logfile in redis.conf, the logs will go to that file. If logfile is empty string, i.e. the default value, and redis-server is not daemonized, the logs will be printed to standard output. If it's empty, and redis-server is daemonized, logs go to /dev/null.
answered Jun 28, 2021 at 0:26
Sign up to request clarification or add additional context in comments.
3 Comments
mjs
Did you read my question? I would like to send something to the log from my lua script. what is the command? redis.log( ... ) ?
for_stack
Yes, you can use the
redis.log to do log in script, and the log goes to where I mentioned in the answer.mjs
hehe i was just guessing with my pseudo code ;)
redis.log(redis.LOG_WARNING, "foo bar")