diff --git a/docs/customization/custom-scripts.md b/docs/customization/custom-scripts.md index 2a8f252aa..870d20c2c 100644 --- a/docs/customization/custom-scripts.md +++ b/docs/customization/custom-scripts.md @@ -139,7 +139,7 @@ These two methods will load data in YAML or JSON format, respectively, from file The Script object provides a set of convenient functions for recording messages at different severity levels: * `log_debug(message, object=None)` -* `log_success(message, object=None)` +* `log_success(message=None, object=None)` * `log_info(message, object=None)` * `log_warning(message, object=None)` * `log_failure(message, object=None)` diff --git a/docs/customization/reports.md b/docs/customization/reports.md index f7eef506d..d40db650f 100644 --- a/docs/customization/reports.md +++ b/docs/customization/reports.md @@ -54,6 +54,15 @@ self.log_failure( ) ``` +### Logging Success Note +If you want to increase the success counter without generating a log message, choose one of the following options: + +```python +log_success(None, None) +log_success("", None) +log_sucess() +``` + ### Other Notes Existing reports will be converted to scripts automatically upon upgrading to NetBox v4.0, and previous job history will be retained. However, users are advised to convert legacy reports into custom scripts at the earliest opportunity, as support for legacy reports will be removed in a future release.