Relates :
|
It's currently quite easy to misinterpret the help message produced by -Xlog:help. For example, I wanted to enable this logging code in nmethod.cpp: LogTarget(Trace, class, unload) lt; and tried `-Xlog:unload=trace`. I overlooked the part of the help message that says "Unless wildcard (*) is specified, only log messages tagged with exactly the tags specified will be matched" otherwise I would have known that `-Xlog:class+unload=trace` or `-Xlog:unload*=trace` is what I needed. With my incorrectly specified option, I only get this warning: [0.002s][warning][logging] No tag set matches selection(s): class To produce such a warning message, the set of allowed tag combinations must be available. As such, the warning could be improved to suggest combinations close to what the user trued based on some fuzzy match (c.f., mistyped VM options): [0.002s][warning][logging] No tag set matches selection(s): unload. Did you mean one of the following supported tag sets: class+load, class+unload, class* In addition, the actual set of supported tag sets could be shown in the help message instead of just the individual tags, some of which (like `class`) cannot be used on their own. Or maybe the help message should just state that these tag sets can be seen with `-Xlog:logging=trace`.