Skip to content

robot.output.loggerapi

LoggerApi

output_file

output_file(path: Path)

Called when XML output file is closed.

Calls :meth:result_file by default.

Source code in src/robot/output/loggerapi.py
def output_file(self, path: Path):
    """Called when XML output file is closed.

    Calls :meth:`result_file` by default.
    """
    self.result_file('Output', path)

report_file

report_file(path: Path)

Called when report file is closed.

Calls :meth:result_file by default.

Source code in src/robot/output/loggerapi.py
def report_file(self, path: Path):
    """Called when report file is closed.

    Calls :meth:`result_file` by default.
    """
    self.result_file('Report', path)

log_file

log_file(path: Path)

Called when log file is closed.

Calls :meth:result_file by default.

Source code in src/robot/output/loggerapi.py
def log_file(self, path: Path):
    """Called when log file is closed.

    Calls :meth:`result_file` by default.
    """
    self.result_file('Log', path)

xunit_file

xunit_file(path: Path)

Called when xunit file is closed.

Calls :meth:result_file by default.

Source code in src/robot/output/loggerapi.py
def xunit_file(self, path: Path):
    """Called when xunit file is closed.

    Calls :meth:`result_file` by default.
    """
    self.result_file('XUnit', path)

debug_file

debug_file(path: Path)

Called when debug file is closed.

Calls :meth:result_file by default.

Source code in src/robot/output/loggerapi.py
def debug_file(self, path: Path):
    """Called when debug file is closed.

    Calls :meth:`result_file` by default.
    """
    self.result_file('Debug', path)

result_file

1
2
3
4
5
6
result_file(
    kind: Literal[
        "Output", "Report", "Log", "XUnit", "Debug"
    ],
    path: Path,
)

Called when any result file is closed by default.

kind specifies the file type. This method is not called if a result file specific method like :meth:output_file is implemented.

Source code in src/robot/output/loggerapi.py
def result_file(self, kind: Literal['Output', 'Report', 'Log', 'XUnit', 'Debug'],
                path: Path):
    """Called when any result file is closed by default.

    ``kind`` specifies the file type. This method is not called if a result
    file specific method like :meth:`output_file` is implemented.
    """
    pass