File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3434,6 +3434,9 @@ Reporters
34343434
34353435StepReporter
34363436~~~~~~~~~~~~
3437+ .. warning ::
3438+ The StepReporter is deprecated, use the `StepLogger `_ instead.
3439+
34373440The :any: `StepReporter ` outputs individual labgrid steps to `STDOUT `.
34383441
34393442.. doctest ::
@@ -3471,6 +3474,32 @@ The Reporter can be stopped with a call to the stop function:
34713474Stopping the ConsoleLoggingReporter if it has not been started will raise an
34723475AssertionError, as will starting an already started StepReporter.
34733476
3477+ Loggers
3478+ -------
3479+
3480+ StepLogger
3481+ ~~~~~~~~~~
3482+ The :any: `StepLogger ` logs individual labgrid steps.
3483+
3484+ Logging can be set up via ``labgrid.logging.basicConfig() ``.
3485+
3486+ .. doctest ::
3487+
3488+ >>> import logging
3489+ >>> from labgrid.logging import basicConfig, StepLogger
3490+ >>> basicConfig(level = logging.INFO )
3491+ >>> StepLogger.start()
3492+
3493+ The logger can be stopped with a call to the stop function:
3494+
3495+ .. doctest ::
3496+
3497+ >>> from labgrid.logging import StepLogger
3498+ >>> StepLogger.stop()
3499+
3500+ Stopping the StepLogger if it has not been started will raise an
3501+ AssertionError, as will starting an already started StepLogger.
3502+
34743503Environment Configuration
34753504-------------------------
34763505The environment configuration for a test environment consists of a YAML file
Original file line number Diff line number Diff line change @@ -764,7 +764,7 @@ Step Tracing
764764
765765The Step infrastructure already collects timing and nesting information on
766766executed commands, but is currently only used in the pytest plugin or via the
767- standalone StepReporter.
767+ standalone StepLogger (or deprecated StepReporter) .
768768By writing these events to a file (or sqlite database) as a trace, we can
769769collect data over multiple runs for later analysis.
770770This would become more useful by passing recognized events (stack traces,
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ def __attrs_post_init__(self):
136136 from warnings import warn
137137
138138 warn (
139- "StepLogger should not be instantiated, use StepReporter .start()/.stop() instead." ,
139+ "StepLogger should not be instantiated, use StepLogger .start()/.stop() instead." ,
140140 DeprecationWarning ,
141141 stacklevel = 2 ,
142142 )
You can’t perform that action at this time.
0 commit comments