Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the AlertLogName column width of log-output configurable #76

Open
riedel-ferringer opened this issue Sep 9, 2022 · 2 comments
Open

Comments

@riedel-ferringer
Copy link
Contributor

To provide better formatted output, I think that the AlertLogName column should be customizable wrt. to it's width.
I see two (three) ways here:

  • Define min width only. If the user create a longer AlertLogName, this min width automatically increases. Of course, this results in a misalignment every time a longer AlertLogName is created.
  • Define max width only. If the name is too long, shorten it and append "..." to the end
  • (Define min/max and combine both methods)

Optional Enhancements:

  • Allow to configure the justification (left/center/right)
  • Allow the delimiter (which is currently a comma) to be configurable
@JimLewis
Copy link
Member

JimLewis commented Sep 12, 2022

WRT minimum width, have you tried:

    SetAlertLogOptions(WriteTimeLast => FALSE) ; 
    SetAlertLogOptions(TimeJustifyAmount => 15) ; 
    SetAlertLogJustify ; 

After setting all of the AlertLogIDs, if you call SetAlertLogJustify, it will automatically create a field width that is big enough for printing all IDs.

It makes you think about how long you want lower level IDs' that don't print often.

Currently it is left justified. And it does not clip if the names exceed a certain length.

@riedel-ferringer
Copy link
Contributor Author

With this approach you'd have to set all your AlertLogIDs before calling SetAlertLogJustify. This is basically a fine solution, but I would prefer it to generate log IDs as I go (ie, during a testcase new IDs will be created on the fly). For example,

GetAlertLogId("testcase-preparation");
...
GetAlertLogId("testcase-action");
...
GetAlertLogId("testcase-finalization");

It's a minor thing only, but as we are mainly working with text-based log output, formatting is quite important to keep things readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants