Robot Framework
robot.output.xmllogger.XmlLogger Class Reference
Inheritance diagram for robot.output.xmllogger.XmlLogger:
robot.result.visitor.ResultVisitor robot.model.visitor.SuiteVisitor robot.reporting.outputwriter.OutputWriter

Public Member Functions

def __init__ (self, path, log_level='TRACE', rpa=False, generator='Robot')
 
def close (self)
 
def end_break (self, break_)
 Called when a BREAK element ends. More...
 
def end_continue (self, continue_)
 Called when a CONTINUE element ends. More...
 
def end_errors (self, errors=None)
 
def end_for (self, for_)
 Called when a FOR loop ends. More...
 
def end_for_iteration (self, iteration)
 Called when a FOR loop iteration ends. More...
 
def end_if (self, if_)
 Called when an IF/ELSE structure ends. More...
 
def end_if_branch (self, branch)
 Called when an IF/ELSE branch ends. More...
 
def end_keyword (self, kw)
 Called when a keyword ends. More...
 
def end_return (self, return_)
 Called when a RETURN element ends. More...
 
def end_statistics (self, stats)
 
def end_suite (self, suite)
 Called when a suite ends. More...
 
def end_suite_statistics (self, tag_stats)
 
def end_tag_statistics (self, tag_stats)
 
def end_test (self, test)
 Called when a test ends. More...
 
def end_total_statistics (self, total_stats)
 
def end_try (self, root)
 Called when a TRY/EXCEPT structure ends. More...
 
def end_try_branch (self, branch)
 Called when TRY, EXCEPT, ELSE and FINALLY branches end. More...
 
def end_while (self, while_)
 Called when a WHILE loop ends. More...
 
def end_while_iteration (self, iteration)
 Called when a WHILE loop iteration ends. More...
 
def log_message (self, msg)
 
def message (self, msg)
 
def set_log_level (self, level)
 
def start_break (self, break_)
 Called when a BREAK element starts. More...
 
def start_continue (self, continue_)
 Called when a CONTINUE element starts. More...
 
def start_errors (self, errors=None)
 
def start_for (self, for_)
 Called when a FOR loop starts. More...
 
def start_for_iteration (self, iteration)
 Called when a FOR loop iteration starts. More...
 
def start_if (self, if_)
 Called when an IF/ELSE structure starts. More...
 
def start_if_branch (self, branch)
 Called when an IF/ELSE branch starts. More...
 
def start_keyword (self, kw)
 Called when a keyword starts. More...
 
def start_return (self, return_)
 Called when a RETURN element starts. More...
 
def start_statistics (self, stats)
 
def start_suite (self, suite)
 Called when a suite starts. More...
 
def start_suite_statistics (self, tag_stats)
 
def start_tag_statistics (self, tag_stats)
 
def start_test (self, test)
 Called when a test starts. More...
 
def start_total_statistics (self, total_stats)
 
def start_try (self, root)
 Called when a TRY/EXCEPT structure starts. More...
 
def start_try_branch (self, branch)
 Called when TRY, EXCEPT, ELSE or FINALLY branches start. More...
 
def start_while (self, while_)
 Called when a WHILE loop starts. More...
 
def start_while_iteration (self, iteration)
 Called when a WHILE loop iteration starts. More...
 
def visit_stat (self, stat)
 
- Public Member Functions inherited from robot.result.visitor.ResultVisitor
def end_result (self, result)
 
def end_stat (self, stat)
 
def start_result (self, result)
 
def start_stat (self, stat)
 
def visit_errors (self, errors)
 
def visit_result (self, result)
 
def visit_statistics (self, stats)
 
def visit_suite_statistics (self, stats)
 
def visit_tag_statistics (self, stats)
 
def visit_total_statistics (self, stats)
 
- Public Member Functions inherited from robot.model.visitor.SuiteVisitor
def end_body_item (self, item)
 Called, by default, when keywords, messages or control structures end. More...
 
def end_message (self, msg)
 Called when a message ends. More...
 
def start_body_item (self, item)
 Called, by default, when keywords, messages or control structures start. More...
 
def start_message (self, msg)
 Called when a message starts. More...
 
def visit_break (self, break_)
 Visits BREAK elements. More...
 
def visit_continue (self, continue_)
 Visits CONTINUE elements. More...
 
def visit_for (self, for_)
 Implements traversing through FOR loops. More...
 
def visit_for_iteration (self, iteration)
 Implements traversing through single FOR loop iteration. More...
 
def visit_if (self, if_)
 Implements traversing through IF/ELSE structures. More...
 
def visit_if_branch (self, branch)
 Implements traversing through single IF/ELSE branch. More...
 
def visit_keyword (self, kw)
 Implements traversing through keywords. More...
 
def visit_message (self, msg)
 Implements visiting messages. More...
 
def visit_return (self, return_)
 Visits a RETURN elements. More...
 
def visit_suite (self, suite)
 Implements traversing through suites. More...
 
def visit_test (self, test)
 Implements traversing through tests. More...
 
def visit_try (self, try_)
 Implements traversing through TRY/EXCEPT structures. More...
 
def visit_try_branch (self, branch)
 Visits individual TRY, EXCEPT, ELSE and FINALLY branches. More...
 
def visit_while (self, while_)
 Implements traversing through WHILE loops. More...
 
def visit_while_iteration (self, iteration)
 Implements traversing through single WHILE loop iteration. More...
 

Private Member Functions

def _get_writer (self, path, rpa, generator)
 
def _write_list (self, tag, items)
 
def _write_message (self, msg)
 
def _write_status (self, item)
 

Private Attributes

 _error_message_is_logged
 
 _errors
 
 _log_message_is_logged
 
 _writer
 

Detailed Description

Definition at line 23 of file xmllogger.py.

Constructor & Destructor Documentation

◆ __init__()

def robot.output.xmllogger.XmlLogger.__init__ (   self,
  path,
  log_level = 'TRACE',
  rpa = False,
  generator = 'Robot' 
)

Definition at line 25 of file xmllogger.py.

Member Function Documentation

◆ _get_writer()

def robot.output.xmllogger.XmlLogger._get_writer (   self,
  path,
  rpa,
  generator 
)
private

Definition at line 31 of file xmllogger.py.

◆ _write_list()

def robot.output.xmllogger.XmlLogger._write_list (   self,
  tag,
  items 
)
private

Definition at line 244 of file xmllogger.py.

◆ _write_message()

def robot.output.xmllogger.XmlLogger._write_message (   self,
  msg 
)
private

Definition at line 60 of file xmllogger.py.

◆ _write_status()

def robot.output.xmllogger.XmlLogger._write_status (   self,
  item 
)
private

Definition at line 248 of file xmllogger.py.

◆ close()

def robot.output.xmllogger.XmlLogger.close (   self)

Reimplemented in robot.reporting.outputwriter.OutputWriter.

Definition at line 41 of file xmllogger.py.

◆ end_break()

def robot.output.xmllogger.XmlLogger.end_break (   self,
  break_ 
)

Called when a BREAK element ends.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 183 of file xmllogger.py.

◆ end_continue()

def robot.output.xmllogger.XmlLogger.end_continue (   self,
  continue_ 
)

Called when a CONTINUE element ends.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 176 of file xmllogger.py.

◆ end_errors()

def robot.output.xmllogger.XmlLogger.end_errors (   self,
  errors = None 
)

Reimplemented from robot.result.visitor.ResultVisitor.

Definition at line 241 of file xmllogger.py.

◆ end_for()

def robot.output.xmllogger.XmlLogger.end_for (   self,
  for_ 
)

Called when a FOR loop ends.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 110 of file xmllogger.py.

◆ end_for_iteration()

def robot.output.xmllogger.XmlLogger.end_for_iteration (   self,
  iteration 
)

Called when a FOR loop iteration ends.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 120 of file xmllogger.py.

◆ end_if()

def robot.output.xmllogger.XmlLogger.end_if (   self,
  if_ 
)

Called when an IF/ELSE structure ends.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 89 of file xmllogger.py.

◆ end_if_branch()

def robot.output.xmllogger.XmlLogger.end_if_branch (   self,
  branch 
)

Called when an IF/ELSE branch ends.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 98 of file xmllogger.py.

◆ end_keyword()

def robot.output.xmllogger.XmlLogger.end_keyword (   self,
  keyword 
)

Called when a keyword ends.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 79 of file xmllogger.py.

◆ end_return()

def robot.output.xmllogger.XmlLogger.end_return (   self,
  return_ 
)

Called when a RETURN element ends.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 169 of file xmllogger.py.

◆ end_statistics()

def robot.output.xmllogger.XmlLogger.end_statistics (   self,
  stats 
)

Reimplemented from robot.result.visitor.ResultVisitor.

Definition at line 213 of file xmllogger.py.

◆ end_suite()

def robot.output.xmllogger.XmlLogger.end_suite (   self,
  suite 
)

Called when a suite ends.

Default implementation does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 203 of file xmllogger.py.

◆ end_suite_statistics()

def robot.output.xmllogger.XmlLogger.end_suite_statistics (   self,
  tag_stats 
)

Reimplemented from robot.result.visitor.ResultVisitor.

Definition at line 231 of file xmllogger.py.

◆ end_tag_statistics()

def robot.output.xmllogger.XmlLogger.end_tag_statistics (   self,
  tag_stats 
)

Reimplemented from robot.result.visitor.ResultVisitor.

Definition at line 225 of file xmllogger.py.

◆ end_test()

def robot.output.xmllogger.XmlLogger.end_test (   self,
  test 
)

Called when a test ends.

Default implementation does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 191 of file xmllogger.py.

◆ end_total_statistics()

def robot.output.xmllogger.XmlLogger.end_total_statistics (   self,
  total_stats 
)

Reimplemented from robot.result.visitor.ResultVisitor.

Definition at line 219 of file xmllogger.py.

◆ end_try()

def robot.output.xmllogger.XmlLogger.end_try (   self,
  try_ 
)

Called when a TRY/EXCEPT structure ends.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 127 of file xmllogger.py.

◆ end_try_branch()

def robot.output.xmllogger.XmlLogger.end_try_branch (   self,
  branch 
)

Called when TRY, EXCEPT, ELSE and FINALLY branches end.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 141 of file xmllogger.py.

◆ end_while()

def robot.output.xmllogger.XmlLogger.end_while (   self,
  while_ 
)

Called when a WHILE loop ends.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 152 of file xmllogger.py.

◆ end_while_iteration()

def robot.output.xmllogger.XmlLogger.end_while_iteration (   self,
  iteration 
)

Called when a WHILE loop iteration ends.

    By default, calls :meth:`end_body_item` which, by default, does nothing.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 160 of file xmllogger.py.

◆ log_message()

def robot.output.xmllogger.XmlLogger.log_message (   self,
  msg 
)

Definition at line 56 of file xmllogger.py.

◆ message()

def robot.output.xmllogger.XmlLogger.message (   self,
  msg 
)

Definition at line 52 of file xmllogger.py.

◆ set_log_level()

def robot.output.xmllogger.XmlLogger.set_log_level (   self,
  level 
)

Definition at line 49 of file xmllogger.py.

◆ start_break()

def robot.output.xmllogger.XmlLogger.start_break (   self,
  break_ 
)

Called when a BREAK element starts.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 180 of file xmllogger.py.

◆ start_continue()

def robot.output.xmllogger.XmlLogger.start_continue (   self,
  continue_ 
)

Called when a CONTINUE element starts.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 173 of file xmllogger.py.

◆ start_errors()

def robot.output.xmllogger.XmlLogger.start_errors (   self,
  errors = None 
)

Reimplemented from robot.result.visitor.ResultVisitor.

Definition at line 238 of file xmllogger.py.

◆ start_for()

def robot.output.xmllogger.XmlLogger.start_for (   self,
  for_ 
)

Called when a FOR loop starts.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 102 of file xmllogger.py.

◆ start_for_iteration()

def robot.output.xmllogger.XmlLogger.start_for_iteration (   self,
  iteration 
)

Called when a FOR loop iteration starts.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 114 of file xmllogger.py.

◆ start_if()

def robot.output.xmllogger.XmlLogger.start_if (   self,
  if_ 
)

Called when an IF/ELSE structure starts.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 85 of file xmllogger.py.

◆ start_if_branch()

def robot.output.xmllogger.XmlLogger.start_if_branch (   self,
  branch 
)

Called when an IF/ELSE branch starts.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 93 of file xmllogger.py.

◆ start_keyword()

def robot.output.xmllogger.XmlLogger.start_keyword (   self,
  keyword 
)

Called when a keyword starts.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 66 of file xmllogger.py.

◆ start_return()

def robot.output.xmllogger.XmlLogger.start_return (   self,
  return_ 
)

Called when a RETURN element starts.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 164 of file xmllogger.py.

◆ start_statistics()

def robot.output.xmllogger.XmlLogger.start_statistics (   self,
  stats 
)

Reimplemented from robot.result.visitor.ResultVisitor.

Definition at line 210 of file xmllogger.py.

◆ start_suite()

def robot.output.xmllogger.XmlLogger.start_suite (   self,
  suite 
)

Called when a suite starts.

Default implementation does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 199 of file xmllogger.py.

◆ start_suite_statistics()

def robot.output.xmllogger.XmlLogger.start_suite_statistics (   self,
  tag_stats 
)

Reimplemented from robot.result.visitor.ResultVisitor.

Definition at line 228 of file xmllogger.py.

◆ start_tag_statistics()

def robot.output.xmllogger.XmlLogger.start_tag_statistics (   self,
  tag_stats 
)

Reimplemented from robot.result.visitor.ResultVisitor.

Definition at line 222 of file xmllogger.py.

◆ start_test()

def robot.output.xmllogger.XmlLogger.start_test (   self,
  test 
)

Called when a test starts.

Default implementation does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 187 of file xmllogger.py.

◆ start_total_statistics()

def robot.output.xmllogger.XmlLogger.start_total_statistics (   self,
  total_stats 
)

Reimplemented from robot.result.visitor.ResultVisitor.

Definition at line 216 of file xmllogger.py.

◆ start_try()

def robot.output.xmllogger.XmlLogger.start_try (   self,
  try_ 
)

Called when a TRY/EXCEPT structure starts.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 124 of file xmllogger.py.

◆ start_try_branch()

def robot.output.xmllogger.XmlLogger.start_try_branch (   self,
  branch 
)

Called when TRY, EXCEPT, ELSE or FINALLY branches start.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 131 of file xmllogger.py.

◆ start_while()

def robot.output.xmllogger.XmlLogger.start_while (   self,
  while_ 
)

Called when a WHILE loop starts.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 145 of file xmllogger.py.

◆ start_while_iteration()

def robot.output.xmllogger.XmlLogger.start_while_iteration (   self,
  iteration 
)

Called when a WHILE loop iteration starts.

    By default, calls :meth:`start_body_item` which, by default, does nothing.

    Can return explicit ``False`` to stop visiting.

Reimplemented from robot.model.visitor.SuiteVisitor.

Definition at line 156 of file xmllogger.py.

◆ visit_stat()

def robot.output.xmllogger.XmlLogger.visit_stat (   self,
  stat 
)

Reimplemented from robot.result.visitor.ResultVisitor.

Definition at line 234 of file xmllogger.py.

Member Data Documentation

◆ _error_message_is_logged

robot.output.xmllogger.XmlLogger._error_message_is_logged
private

Definition at line 27 of file xmllogger.py.

◆ _errors

robot.output.xmllogger.XmlLogger._errors
private

Definition at line 29 of file xmllogger.py.

◆ _log_message_is_logged

robot.output.xmllogger.XmlLogger._log_message_is_logged
private

Definition at line 26 of file xmllogger.py.

◆ _writer

robot.output.xmllogger.XmlLogger._writer
private

Definition at line 28 of file xmllogger.py.


The documentation for this class was generated from the following file: