Redis的Errorlog或者啓動日誌(錯誤日誌)的配置

 

Errorlog或者是運行日誌是任何一個軟件的運行中異常診斷必看的文件之一,折騰Redis的過程當中覺得有默認的錯誤日誌(或啓動日誌),不過一直沒有發現相似的日誌文件,
在看了默認的配置文件以後,發現Redis默認並無配置ErrorLog,上面寫的很清楚,若是沒有指定logfile(的路徑),logs will be sent to /dev/nullredis

# Specify the log file name. Also the empty string can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
logfile ""日誌

所以在給logfile "/usr/local/redis5/redis_log.log"指定一個文件以後,啓動Redis的過程,將會把啓動過程當中的日誌信息寫入日誌文件(包括啓動錯誤日誌信息,運行日誌,bgsave備份日誌等等)
啓動日誌的格式也是跟控制檯的日誌格式同樣。blog

相關文章
相關標籤/搜索