Skip to content

Commit

Permalink
DOCS-1636: Add logging examples for python (#2377)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcvella authored Jan 11, 2024
1 parent c8c18e9 commit 4f42ad2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/registry/create/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,14 @@ from viam.logging import getLogger
# Before your first class or function, define the LOGGER variable:
LOGGER = getLogger(__name__)
# in some method, log information
LOGGER.debug("debug info")
LOGGER.info("info info")
LOGGER.warn("warn info")
LOGGER.error("error info")
LOGGER.exception("error info", exc_info=True)
LOGGER.critical("critical info")
```
{{% /tab %}}
Expand Down

0 comments on commit 4f42ad2

Please sign in to comment.