vinyl: improve logging in vylog
- Log debug messages at VERBOSE log level. Currently, the only way to debug a vylog failure in production is enabling DEBUG log level, but that basically floods the log with tons of not so important messages. There are not that many vylog messages so it should be OK to log them with say_verbose(). - Report the filename on failure to load or save a vylog in order to simplify identification of the corrupted file. - Log some critical errors, such as error processing a vylog record or failure to flush the vylog for recovery. - Add sentinel messages for log rotation, saving, and loading, logged at VERBOSE level. This will help matching dumped log records to high level operations that emitted them. - Remove debug logging from the vy_recovery callback, which is invoked by vy_recovery_iterate() and vy_recovery_load_index(), as it is a responsibility of the caller to write log messages there, not of the vylog internal implementation. Besides, dumping all replayed records there is not really necessary as they are dumped while vylog is loaded anyway (see vy_recovery_new()), which should be enough for debugging.
Loading
Please register or sign in to comment