Logging
The main goal of logging is to document the operations performed in the task for further analysis. Logging makes it possible to identify errors in the task's operation
this.doLog
Shows whether task logging is enabled; can be used as a flag for optimization, for cases where the log is not kept and the argument to this.logger.put is a complex expression
this.logger.*
.put(message)
this.logger.put(message) - adds the line message to the task log, formats the output similarly to console.log
this.logger.put("Start scraping query: " + set.query);

.putHTML(HTML)
this.logger.putHTML(code) - outputs HTML code to the task log, which will be displayed in textarea
const message = "<!DOCTYPE html>\n"
+ "<html>\n"
+ "<body>\n"
+ "<h1>This is heading 1</h1>\n"
+ "<h2>This is heading 2</h2>\n"
+ "<h3>This is heading 3</h3>\n"
+ "<h4>This is heading 4</h4>\n"
+ "<h5>This is heading 5</h5>\n"
+ "<h6>This is heading 6</h6>\n"
+ "</body>\n"
+ "</html>";
this.logger.putHTML(message);

console.log(message)
Outputs the contents of message to the log file - aparser.log
this.console.*
All methods relate to outputting console logs, are created to improve logging for different tasks and different threads within tasks
.log(...message)
this.console.log(...message) - logging tied to the current thread, allows outputting a prefix for each thread
.setPrefix(prefix)
Used in conjunction with BaseParser.setGlobalConsolePrefix(prefix) - allows setting a global prefix for all threads within the current task.
this.console.setPrefix(prefix) - allows setting a prefix for the current thread, for example
this.console.setPrefix(this.threadId())