How to log custom messages in machine configs


When you need to add custom log messages on different steps of machine config execution, one can utilize log plugin and log built in object, more details here:

As a bonus “warn” or higher messages will appear on the Info dialog popup (where execution events/errors use to be displayed)

   <log message="attribute message, default level (INFO)"/>
   <log message="attribute message, level=error" level="ERROR"/>
   <log level="WARN">
     <template>message template, execution of the record with id: ${record_id}</template>
"logs info message");
          log.warn("logs warn message");
          log.warn("executing record with id: {}", record_id.toString());
          try {
              Integer i = null;
          } catch (Exception e) {
            log.error("Error!!!", e);
            log.error("Error short: {}", e.getMessage());
            log.debug("Error debug!!!");