Messages: Refine source field truncation
This MR addresses a longstanding annoyance, at least on the ATLAS side. With our deep stack of AlgTools the component name (with parents) is often longer than the source-field of the message. Since the source-name is truncated at the end we never see which component is actually emitting the message. This MR introduces a new format-specifier ('c') that cuts out the middle part of the source-name while giving priority to the last component in the stack. This way, a message like
InDetSCT_Clusterization.InDetSCT_ConditionsSumm... INFO Database will be used.
becomes
InDetSCT_Clusterization...InDetSCT_TdaqEnabledTool INFO Database will be used.
The abbreviation strategy is as follows:
- If the field-width can accommodate the name of the last component, it will print it preceded by three dots and filling up the remaining width by printing the beginning of the input string
- If the field-width can not even accommodate the last component-name or if no dot is found, it will cut out the middle-part, eg print the beginning of the input string, three dots and the end of the input string
Merge request reports
Activity
- Resolved by Walter Lampl
assigned to @clemenci
changed milestone to %v34r1
added lhcb-gaudi-head label
- [2020-10-07 16:26] Validation started with lhcb-gaudi-head#2740
- [2020-10-08 00:15] Validation started with lhcb-gaudi-head#2741
- [2020-10-08 10:03] Validation started with lhcb-gaudi-head#2742
- [2020-10-09 00:15] Validation started with lhcb-gaudi-head#2743
- [2020-10-10 00:13] Validation started with lhcb-gaudi-head#2744
- [2020-10-11 00:03] Validation started with lhcb-gaudi-head#2745
Edited by Software for LHCbmentioned in commit 4b9d61f0
@wlampl awesome addition!
@clemenci in a next Gaudi version we can fix the default format (and even maybe switch to the new
%c
):- "% F%18W%S%7W%R%T %0W%M" + "% F%18W%S %7W%R%T %0W%M"
such that WARNING and SUCCESS is not immediately next to the source..., e.g.
- InDetSCT_Clusterization.InDetSCT_ConditionsSumm...WARNING This is a warning + InDetSCT_Clusterization.InDetSCT_ConditionsSumm... WARNING This is a warning
Edited by Rosen Matev