Skip to content
Snippets Groups Projects

Messages: Refine source field truncation

Merged Walter Lampl requested to merge wlampl/Gaudi:msgTruncation into master
All threads resolved!

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Walter Lampl added 1 commit

    added 1 commit

    • 052b6156 - Message.sizeField: Refine documentation

    Compare with previous version

  • Walter Lampl added 2 commits

    added 2 commits

    Compare with previous version

  • Walter Lampl resolved all threads

    resolved all threads

  • Marco Clemencic changed milestone to %v34r1

    changed milestone to %v34r1

  • Edited by Software for LHCb
  • Marco Clemencic approved this merge request

    approved this merge request

  • Marco Clemencic mentioned in commit 4b9d61f0

    mentioned 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
  • Please register or sign in to reply
    Loading