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

Customised print_log #820

Merged
merged 1 commit into from
Feb 2, 2022
Merged

Customised print_log #820

merged 1 commit into from
Feb 2, 2022

Conversation

ggodart
Copy link
Contributor

@ggodart ggodart commented Jan 14, 2021

This requests renames print_log to print_log_simple and creates a new version of print_log that;

  1. adds optional parameters severity and source
  2. if the implementation has a print_log_private subroutine, this is called instead of print_log_simple allowing the implementation to route messages e.g. based on severity. Otherwise print_log_simple is called with the message concatenated with severity and source. Message has to be first to preserve print_log("logfile=myfile.log ...") functionality.
    Backwards compatibility tested.
    Docs updated at https://github.com/hollie/misterhouse/wiki/Developer-help#logging and https://github.com/hollie/misterhouse/wiki/Functions#print_log-print_log_simple-print_msg-print_speaklog (note you may need to scroll here as there appears to be a bug in some browsers).
    An example print_log_private is provided in code/examples

@hplato hplato merged commit 5ec8a00 into hollie:master Feb 2, 2022
@hplato hplato mentioned this pull request Aug 22, 2023
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

Successfully merging this pull request may close these issues.

2 participants