This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Description
Log IDs are printed to the log in a huge number of different styles, making it hard to search. All of these occur:
- log %lu
- logid %lu
- log_id %lu
- Log %lu
- Logid %lu
- LogID %lu
- log:%lu (no space)
- log_:%lu
- Log:%lu
- log: %lu (with space)
- Log: %lu
- LogID: %lu
- %lue%un%u (log ID with lsn, e.g. "42e420n1337")
Would be nice to codemod all of these to a single style, e.g. "log:%lu". We don't care which particular style wins, only that it be easily searchable.
- Maybe add logid_to_string() similar to lsn_to_string()? That would be slower because of the allocation in std::string
- Maybe have a macro similar to PRId64?
- Add a lint rule for things like "log %lu", "log: %lu" etc?
Probably also unify the style of log+lsn, e.g. to "log:42-e420n1337".
Until then, here's a regex to search for log 42: [Ll]og_?([Ii][Dd])?:? ?42\b|\b42e