Skip to content

scripts: new log#2493

Merged
georglauterbach merged 11 commits intomasterfrom
new-log
Mar 21, 2022
Merged

scripts: new log#2493
georglauterbach merged 11 commits intomasterfrom
new-log

Conversation

@georglauterbach
Copy link
Copy Markdown
Member

Description

This PR introduces a new _log function. As a successor to the closed #2486, this PR is still big, but tighter and only brings

  1. the new _log function
  2. updated log levels for most scripts
  3. necessary documentation updates

Type of change

  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change that does improve existing functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

With `_log`, the `_notify` method wa rendered obsolete. `_notify` was
not completely removed due to test failures in `check-for-changes.sh`.

The new `_log` function properly uses log levels such as `trace`,
`debug`, `info`, `warn` and `error`. It provides a cleaner solution
and renders `DMS_DEBUG` obsolete too (as only `_notify` depends on it).
@georglauterbach georglauterbach added kind/new feature A new feature is requested in this issue or implemeted with this PR area/scripts kind/update Update an existing feature, configuration file or the documentation labels Mar 19, 2022
@georglauterbach georglauterbach added this to the v11.0.0 milestone Mar 19, 2022
@georglauterbach georglauterbach self-assigned this Mar 19, 2022
@georglauterbach
Copy link
Copy Markdown
Member Author

georglauterbach commented Mar 19, 2022

@polarathene @casperklein I hope this PR is easier to review. It does not contain changes to check-for-changes.sh - this will be done in the future.

polarathene
polarathene previously approved these changes Mar 20, 2022
Copy link
Copy Markdown
Member

@polarathene polarathene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work 👍

Nicely organized commits, easy to review diffs/changes. Thanks! 😀

Only hiccup I noticed was coding-style.md doc log levels. Not a major issue as the setup-stack.sh snippet is now outdated (bulk of it moved to aliases.sh helper). I added two commit suggestions that just apply the changes you made to those two log lines. No need to further adjust the snippet for this PR, that can always be done in a small docs fix PR if syncing it to latest content has any value.

@georglauterbach
Copy link
Copy Markdown
Member Author

georglauterbach commented Mar 20, 2022

Sorry for the force-push, but I forgot one tiny change. Only "pushed" over one commit though. I applied the docs changes @polarathene as @casperklein also made me aware of them :) Some minor adjustments that resolved many of the suggestions along the way.

There were some comments about the log format, but I took great care when crafting it so I would not like to change it unless there are very good reasons for it. @casperklein I left five suggestions open because I did not want to resolve them on my own. I did not change anything (as it was not necessary), but I wanted you to read them and resolve them if you feel appropriate.

I hope all is well now with this PR :D

@georglauterbach
Copy link
Copy Markdown
Member Author

Test in 2b9ab7c failed because I added ' ' around a name. I corrected this in 1cbde1d and streamlines the message to the new format (without dots at the end, etc.).

Some small adjustments because of PR suggestions happened with the last three commits, nothing big. Tests should pass now. The start-mailserver.sh messages are now normal _log 'info' ... messages, as discussed in #2493 (comment).

@github-actions
Copy link
Copy Markdown
Contributor

Documentation preview for this PR is ready! 🎉

Built with commit: 960af11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/scripts kind/new feature A new feature is requested in this issue or implemeted with this PR kind/update Update an existing feature, configuration file or the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants