Summary:
The new log is typed and concise.
Old log:
[fsmonitor]> clock='c:1559600325:3956709:1:34762' len(nonnormal)=0
[fsmonitor]> setlastclock 'c:1559600325:3956709:1:36405'
[fsmonitor]> setlastisfresh False
[fsmonitor]> watchman returned ["x"]
[fsmonitor]> getlastclock 'c:1559600325:3956709:1:36405'
[fsmonitor]> set clock='c:1559600325:3956709:1:36405' notefiles=["x"]
New log:
[fsmonitor] clock: "c:1559600325:3956709:1:34762" -> "c:1559600325:3956709:1:36405"; need check: [] + ["x"]
In JSON form:
{"fsmonitor":{"new_clock":"c:1559600325:3956709:1:36425","new_files":{"len":1,"short_list":["x"]},"old_clock":"c:1559600325:3956709:1:34762"}
The new logging does not cover every information exposed by the old logging.
For example:
- Non-treestate events like why fsmonitor state gets invalidated.
Assuming most clients are on treestate now. These are removed.
- "fsmonitor_state = normal | unavailable | fresh" scuba logging. This can be
inferred, and will be added in a later diff.
- New "notefiles". The next "fsmoniotr" event will log the information.
Reviewed By: markbt
Differential Revision: D15710672
fbshipit-source-id: 5c4cad08c0072c7dc711e5c1e65aa7552940699e
Summary:
Clean up some of the calls to `ui.log` and how they appear in blackbox logging.
* Make the names of the events consistently use `snake_case`.
* For watchman, only log once for each watchman command. Include whether or not it failed.
* Unify `fsmonitor` logging under the `fsmonitor` event.
* Omit the second argument when it is empty - it is optional and does nothing when empty.
* Increase the number of blackbox lines included in rage to 100.
Reviewed By: quark-zju
Differential Revision: D14949868
fbshipit-source-id: a9aa8251e71ae7ca556c08116f8f7c61ff472218
Summary:
The "fsmonitor returned" file list was made short by D9997658. Do the same
thing for notefiles.
Reviewed By: phillco
Differential Revision: D10865333
fbshipit-source-id: ff31cde04210363e6af04e5578543f1b16310b11
Summary:
Sometimes watchman can return a very long list of files. That would make
blackbox rotate too frequently. Truncate that list.
Reviewed By: phillco
Differential Revision: D9997658
fbshipit-source-id: 1314b7c299a5f50ed344e0b85befd4c0525b1da7