# PyLabRobot Firmware Logging

**URL:** <https://discuss.pylabrobot.org/t/pylabrobot-firmware-logging/337>\
**Category:** General\
**Created:** [September 18, 2025, 9:34pm UTC](https://discuss.pylabrobot.org/t/pylabrobot-firmware-logging/337 "2025-09-18T21:34:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CamilloMoschner](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/camillomoschner/32/7_2.png) [@CamilloMoschner](https://discuss.pylabrobot.org/u/CamilloMoschner)\
**Post date:** [September 18, 2025, 9:34pm UTC](https://discuss.pylabrobot.org/t/pylabrobot-firmware-logging/337/1 "2025-09-18T21:34:18Z")

</div>

Hi everyone,

This question has come up a couple of times, so I wanted to raise it here on the forum:

How can we set PyLabRobot to record all firmware commands sent from the running script into a logfile?

i.e. what do you need to modify in the following…

```python
import logging

logger = logging.getLogger("pylabrobot")
logger.setLevel(logging.DEBUG) # <-- choose a level

```

---

<div class="post-metadata">

**Author:** ![rickwierenga](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/rickwierenga/32/963_2.png) [@rickwierenga](https://discuss.pylabrobot.org/u/rickwierenga)\
**Post date:** [September 18, 2025, 9:36pm UTC](https://discuss.pylabrobot.org/t/pylabrobot-firmware-logging/337/2 "2025-09-18T21:36:03Z")

</div>

LOG\_LEVEL\_IO will log to the standard PLR logger, which is configured as described [here](https://docs.pylabrobot.org/user_guide/configuration.html)

> <https://github.com/PyLabRobot/pylabrobot/blob/20633c758671d452907b72a944018a5b98aa895e/pylabrobot/io/validation_utils.py#L3>

to create a validation file use

```auto
pylabrobot.start_capture(validation_file)

```

per [docs](https://docs.pylabrobot.org/user_guide/machine-agnostic-features/validation.html)

---

<div class="post-metadata">

**Author:** ![CamilloMoschner](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/camillomoschner/32/7_2.png) [@CamilloMoschner](https://discuss.pylabrobot.org/u/CamilloMoschner)\
**Post date:** [September 18, 2025, 9:39pm UTC](https://discuss.pylabrobot.org/t/pylabrobot-firmware-logging/337/3 "2025-09-18T21:39:45Z")

</div>

Thank you!

Do we have a list of log levels documented somewhere?

---

<div class="post-metadata">

**Author:** ![rickwierenga](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/rickwierenga/32/963_2.png) [@rickwierenga](https://discuss.pylabrobot.org/u/rickwierenga)\
**Post date:** [September 18, 2025, 9:40pm UTC](https://discuss.pylabrobot.org/t/pylabrobot-firmware-logging/337/4 "2025-09-18T21:40:25Z")

</div>

this is the only custom one in PLR

other than that we use the default ones

> **[logging — Logging facility for Python](https://docs.python.org/3/library/logging.html#levels)**
>
> The numeric values of logging levels are given in the following table. These are primarily of interest if you want to define your own levels, and need them to have specific values relative to the predefined levels. If you define a level with the same...

---

<div class="post-metadata">

**Author:** ![rickwierenga](https://discuss.pylabrobot.org/user_avatar/discuss.pylabrobot.org/rickwierenga/32/963_2.png) [@rickwierenga](https://discuss.pylabrobot.org/u/rickwierenga)\
**Post date:** [September 18, 2025, 9:42pm UTC](https://discuss.pylabrobot.org/t/pylabrobot-firmware-logging/337/5 "2025-09-18T21:42:23Z")

</div>

```python
import logging
from pylabrobot.io import LOG_LEVEL_IO

logger = logging.getLogger("pylabrobot")
logger.setLevel(LOG_LEVEL_IO)

```
