Robot Framework Integrated Development Environment (RIDE)
robotide.lib.robot.api.logger Namespace Reference

Functions

def console (msg, newline=True, stream='stdout')
 Writes the message to the console. More...
 
def debug (msg, html=False)
 Writes the message to the log file using the DEBUG level. More...
 
def error (msg, html=False)
 Writes the message to the log file using the ERROR level. More...
 
def info (msg, html=False, also_console=False)
 Writes the message to the log file using the INFO level. More...
 
def trace (msg, html=False)
 Writes the message to the log file using the TRACE level. More...
 
def warn (msg, html=False)
 Writes the message to the log file using the WARN level. More...
 
def write (msg, level='INFO', html=False)
 Writes the message to the log file using the given level. More...
 

Function Documentation

◆ console()

def robotide.lib.robot.api.logger.console (   msg,
  newline = True,
  stream = 'stdout' 
)

Writes the message to the console.

If the ``newline`` argument is ``True``, a newline character is
automatically added to the message.

By default the message is written to the standard output stream.
Using the standard error stream is possibly by giving the ``stream``
argument value ``'stderr'``.

Definition at line 143 of file logger.py.

◆ debug()

def robotide.lib.robot.api.logger.debug (   msg,
  html = False 
)

Writes the message to the log file using the DEBUG level.

Definition at line 106 of file logger.py.

◆ error()

def robotide.lib.robot.api.logger.error (   msg,
  html = False 
)

Writes the message to the log file using the ERROR level.

New in Robot Framework 2.9.

Definition at line 130 of file logger.py.

◆ info()

def robotide.lib.robot.api.logger.info (   msg,
  html = False,
  also_console = False 
)

Writes the message to the log file using the INFO level.

If ``also_console`` argument is set to ``True``, the message is
written both to the log file and to the console.

Definition at line 115 of file logger.py.

◆ trace()

def robotide.lib.robot.api.logger.trace (   msg,
  html = False 
)

Writes the message to the log file using the TRACE level.

Definition at line 101 of file logger.py.

◆ warn()

def robotide.lib.robot.api.logger.warn (   msg,
  html = False 
)

Writes the message to the log file using the WARN level.

Definition at line 122 of file logger.py.

◆ write()

def robotide.lib.robot.api.logger.write (   msg,
  level = 'INFO',
  html = False 
)

Writes the message to the log file using the given level.

Valid log levels are ``TRACE``, ``DEBUG``, ``INFO`` (default since RF
2.9.1), ``WARN``, and ``ERROR`` (new in RF 2.9). Additionally it is
possible to use ``HTML`` pseudo log level that logs the message as HTML
using the ``INFO`` level.

Instead of using this method, it is generally better to use the level
specific methods such as ``info`` and ``debug`` that have separate
``html`` argument to control the message format.

Definition at line 86 of file logger.py.