Create user facing messages
The Splunk Machine Learning Toolkit (MLTK) ships with utilities to make user-facing errors easy to manage.
Complete the following steps:
- Import and create a messages logger:
from cexc import get_messages_logger messages = get_messages_logger()
- Add user facing messages:
- Use the following syntax to add a warning message:
some_variable = 'hello there' messages.warn('Message of your choosing: {}'.format(some_variable))
- Use the following syntax to add an error messages:
some_variable = 'hello there' messages.error('Message of your choosing: {}'.format(some_variable))
- Use the following syntax to add a warning message: