1

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
  • To write to the log you can use something like redis.log(redis.LOG_WARNING, "foo bar") Commented Sep 7, 2022 at 16:17

1 Answer 1

3

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

Did you read my question? I would like to send something to the log from my lua script. what is the command? redis.log( ... ) ?
Yes, you can use the redis.log to do log in script, and the log goes to where I mentioned in the answer.
hehe i was just guessing with my pseudo code ;)

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.