Home > Database > Redis > body text

Where is the redis log?

(*-*)浩
Release: 2019-11-29 11:03:51
Original
13952 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!