Redis Log Configuration method

Source: Internet
Author: User
Tags redis

Redis does not generate a log file by default, so it needs to be configured


Configuration method:

1. First find the Redis configuration file

2, open the configuration file, find logfile (there may be multiple logfile, look for the next loglevel), or directly search logfile ""

3. Fill the path with the quotation marks behind logfile, for example: LogFile "D:/redislog/redis.log" (note the direction of the oblique bar, which is reversed in the direction of the diagonal bar in Windows cmd)

4, according to their own path to write, manually set up the log folder, log files do not need to build, to the folder can be, for example, I manually set up the D:\redislog folder

5, save the configuration file to start Redis with this profile, and then this time Redis boot box will become a black frame, what output is not, this is right (because the input is all written to the log file go)

Then you can go to the D:\redislog\redis.log folder to view the logs.


Other precautions:

1, Redis must be started with a configuration file, if it is started directly, it will use the default configuration (and does not exist this default configuration file, so do not want to change it).

2. If prompted, the configuration file is not specified or the profile cannot be read (path error)

3, LogLevel is used to set the log level, the details can be seen in the configuration file above the comments


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.