Make SingleLogSource more robust: file rotation and log size |
|||
Issue descriptionSingleLogSource is pretty dumb right now. It needs to handle log file rotation on Chrome OS. It also needs to avoid sending an entire log file when unnecessary. Think /var/log/messages on a system with many reboots.
,
Jun 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b68e3bed1ed8f2b84cbc53c8ce9a3dc7a2536858 commit b68e3bed1ed8f2b84cbc53c8ce9a3dc7a2536858 Author: sque <sque@chromium.org> Date: Tue Jun 13 21:20:25 2017 SingleLogSource reads whole lines whenever possible Previously, if SingleLogSource found no newline at the end of a read, it would reset the file read offset and return nothing. With this patch, it will return as many whole lines with newlines at the end as it possibly can, and update the file read offset. BUG= 731906 TEST=unit tests pass Review-Url: https://codereview.chromium.org/2930383002 Cr-Commit-Position: refs/heads/master@{#479154} [modify] https://crrev.com/b68e3bed1ed8f2b84cbc53c8ce9a3dc7a2536858/chrome/browser/chromeos/system_logs/single_log_source.cc [modify] https://crrev.com/b68e3bed1ed8f2b84cbc53c8ce9a3dc7a2536858/chrome/browser/chromeos/system_logs/single_log_source_unittest.cc
,
Jun 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bc3c128e15e218688cd067a17e5966fce4364ec1 commit bc3c128e15e218688cd067a17e5966fce4364ec1 Author: sque <sque@chromium.org> Date: Tue Jun 13 23:07:25 2017 SingleLogSource handles rotation of log files By observing underlying file inode values, SingleLogSource can tell when a log file has been rotated (renamed and then replaced). When this state is detected, SingleLogSource will read the remainder of the old log file and then start reading from the new log file. BUG= 731906 TEST=unit tests pass Review-Url: https://codereview.chromium.org/2940493002 Cr-Commit-Position: refs/heads/master@{#479194} [modify] https://crrev.com/bc3c128e15e218688cd067a17e5966fce4364ec1/chrome/browser/chromeos/system_logs/single_log_source.cc [modify] https://crrev.com/bc3c128e15e218688cd067a17e5966fce4364ec1/chrome/browser/chromeos/system_logs/single_log_source.h [modify] https://crrev.com/bc3c128e15e218688cd067a17e5966fce4364ec1/chrome/browser/chromeos/system_logs/single_log_source_unittest.cc
,
Aug 8 2017
,
Jan 22 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Jun 13 2017