logging: include file name suffixes in XLOG() category names
authorAdam Simpkins <simpkins@fb.com>
Wed, 10 Jan 2018 04:08:38 +0000 (20:08 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 10 Jan 2018 04:26:36 +0000 (20:26 -0800)
commitd056738b3ff6750deb9f7184e35ba284d0a27042
treeb509c473d107d10d4040d8b43ef19547fbbb5a6a
parent59f59178ba38bc793f809d21fc532e160ae5e34b
logging: include file name suffixes in XLOG() category names

Summary:
Update `getXlogCategoryNameForFile()` to keep the file name suffix (e.g., `.h`
or `.cpp`) in the category name.  Previously the code had stripped this out.
However it seems worth leaving it in:
- This makes it possible to independently control log levels for messages from
  the header file vs the cpp file.
- This makes the category name logic slightly easier to explain to users.

The documents I added in D6525997 already describe this new category name
selection behavior.  This change updates the code to match the documented
behavior.

Reviewed By: yfeldblum

Differential Revision: D6690464

fbshipit-source-id: 9af6b549d084bd900f788a08e9213e82579b664a
folly/experimental/logging/test/XlogTest.cpp
folly/experimental/logging/xlog.cpp