logging: treat `/` and `\\` as category name separators
Summary: Update the LogName code to also treat `/` and `\\` as category separators, just like `.`. This makes it easy to use directory and file names directly as log category names. The XLOG() code already turns file names in to log category names. Previously `getXlogCategoryNameForFile()` had to do its own translation of directory separators into `.`. Users manually had to perform this translation on their own when setting the configuration for specific categories. This change makes it possible for users to specify the filename as input directly when updating the logging configuration and it automatically updates the correct category. This also allows us to avoid allocating a new string in `getXlogCategoryNameForFile()` since we no longer have to translate directory separator characters there. Reviewed By: chadaustin Differential Revision: D7348520 fbshipit-source-id: 0e996f4351798b4636786a14ebb2d8820a2cc153
Showing
Please register or sign in to comment