Skip to content

Commit

Permalink
feat(video): python logging
Browse files Browse the repository at this point in the history
  • Loading branch information
wrussell1999 authored Nov 13, 2024
1 parent 3215cd2 commit 1752e5a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions content/docs/15.how-to-guides/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ _This example works for both `io.kestra.plugin.scripts.python.Script` and `io.ke

## Capture Logs

<div class="video-container">
<iframe src="https://www.youtube.com/embed/0FT3iZKgxYg?si=c162iQbg79R_IEa9" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
</div>

---

If your Python code needs to log something to the console, we recommend using the `Kestra.logger()` method from the [Kestra pip package](https://github.com/kestra-io/libs) to instantiate a `logger` object — this logger is configured to correctly capture all Python log levels and send them to the Kestra backend.

```yaml
Expand Down

0 comments on commit 1752e5a

Please sign in to comment.