Currently the UL logging tags are all lower case, and could be the same string as the names of local variables. Consequently, it's difficult to grep for them in the source code. For example, to find all the classinit tags, I'd have to
find . -name \*.cpp -print -o -name \*.hpp -print | xargs grep '[lL]og.*[^a-z]classinit[^a-z]'
The proposal is to change the LOG_TAG_LIST macro, so that it adds a LOG_ prefix to the tags. E.g.,
#define LOG_TAG_LIST \
LOG_TAG(classinit) \
-> LOG_classinit
In the source code, we must use
log_info(LOG_classinit)("blah")
and we can do
find . -name \*.cpp -print -o -name \*.hpp -print | xargs grep LOG_classinit
But this proposal pertains only to the source code and not to the output or command-line. I.e., in the output, the "LOG_" prefix is not printed. Also, user specifies -Xlog:classinit=, not -Xlog:LOG_classinit=
find . -name \*.cpp -print -o -name \*.hpp -print | xargs grep '[lL]og.*[^a-z]classinit[^a-z]'
The proposal is to change the LOG_TAG_LIST macro, so that it adds a LOG_ prefix to the tags. E.g.,
#define LOG_TAG_LIST \
LOG_TAG(classinit) \
-> LOG_classinit
In the source code, we must use
log_info(LOG_classinit)("blah")
and we can do
find . -name \*.cpp -print -o -name \*.hpp -print | xargs grep LOG_classinit
But this proposal pertains only to the source code and not to the output or command-line. I.e., in the output, the "LOG_" prefix is not printed. Also, user specifies -Xlog:classinit=, not -Xlog:LOG_classinit=
- relates to
-
JDK-8146948 Enable listing of LogTagSets and add support for LogTagSet descriptions
-
- Resolved
-