It's possible to log automatically a deprecation warning in a script, to inform users that some scripts might be removed in the future. This method checks the deprecation warnings configuration to only display the message if it is enabled.
You can use it like this:

## First argument is the logger name, second is the message.
$services.logging.deprecate("MyScript", "The script [MyScript] should not be used anymore")

The output warning is displayed with a [DEPRECATED]  prefix.

Tags:
   

Get Connected