Home >Database >Redis >Where is the redis log?

Where is the redis log?

(*-*)浩
(*-*)浩Original
2019-11-29 11:03:5114187browse

Redis will not generate log files by default, so you need to configure

Where is the redis log?

Configuration method:

1. First find the redis configuration file (recommended learning: Redis video tutorial)

2. Open the configuration file and find the logfile (there may be multiple logfile, look for the one with loglevel next to it), or directly search for logfile ""

3, fill the path into the quotation marks after logfile, for example: logfile "d:/redislog/ redis.log" (Pay attention to the direction of the inclined bar. This is the opposite direction of the inclined bar in windows cmd)

4, Manually create the log folder according to the path you wrote. Okay, there is no need to create a log file, just create it in a folder. For example, I manually created the d:\redislog folder

5. Save the configuration file, start redis with this configuration file, and then do this Sometimes the redis startup box will turn into a black box, and there will be no output. This is correct (because all the input is written to the log file)

Then you can go to d:\redislog\redis.log folder to check the log

Other notes:

1. Redis must be started with a configuration file. If it is started directly, it will use the default configuration (and does not This default configuration file does not exist, so don't be tempted to change it).

2. If the

Where is the redis log?

prompt appears, it means that the configuration file is not specified or the configuration file cannot be read (path error)

3 , loglevel is used to set the log level. For details, please see the comments above

in the configuration file. For more Redis related technical articles, please visit the Redis Getting Started Tutorial column to learn!

The above is the detailed content of Where is the redis log?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn