Log

In the Smart Home project, there is a capability to log events using the “Log” object.

The “Log” object provides the following methods for different logging levels:

  1. info(txt): This method is used to log informational messages. You pass the text message as the txt argument. Example usage:
Log.info('This is an informational message.');
  1. warn(txt): This method is used to log warning messages. You pass the text message as the txt argument. Example usage:
Log.warn('This is a warning message.');
  1. error(txt): This method is used to log error messages. You pass the error text message as the txt argument. Example usage:
Log.error('An error occurred.');
  1. debug(txt): This method is used to log debug messages. You pass the debug text message as the txt argument. Example usage:
Log.debug('Debugging information.');

The methods of the “Log” object allow you to log various types of messages such as informational messages, warnings, errors, and debug messages. Logging helps track and analyze events occurring in the Smart Home project, making it easier for the development, testing, and debugging process of your application.


Code examples:

# Log
# ##################################

Log.info 'some text'
Log.warn 'some text'
Log.error 'some text'
Log.debug 'some text'
Last modified February 5, 2024: Merge pull request #270 from e154/master (7108cb6)