Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for log (0.13 sec)

  1. docs/pt/docs/advanced/events.md

    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    Aqui, a função de manipulação de evento `shutdown` irá escrever uma linha de texto `"Application shutdown"` no arquivo `log.txt`.
    
    !!! info "Informação"
        Na função `open()`, o `mode="a"` significa "acrescentar", então, a linha irá ser adicionada depois de qualquer coisa que esteja naquele arquivo, sem sobrescrever o conteúdo anterior.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  2. docs/zh/docs/advanced/events.md

    只有所有 `startup` 事件处理器运行完毕,**FastAPI** 应用才开始接收请求。
    
    ## `shutdown` 事件
    
    使用 `shutdown` 事件声明 `app` 关闭时运行的函数:
    
    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    此处,`shutdown` 事件处理器函数在 `log.txt` 中写入一行文本 `Application shutdown`。
    
    !!! info "说明"
    
        `open()` 函数中,`mode="a"` 指的是**追加**。因此这行文本会添加在文件已有内容之后,不会覆盖之前的内容。
    
    !!! tip "提示"
    
        注意,本例使用 Python `open()` 标准函数与文件交互。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  3. docs/en/docs/release-notes.md

    * 👥 Update FastAPI People. PR [#9181](https://github.com/tiangolo/fastapi/pull/9181) by [@github-actions[bot]](https://github.com/apps/github-actions).
    * 🔊 Log GraphQL errors in FastAPI People, because it returns 200, with a payload with an error. PR [#9171](https://github.com/tiangolo/fastapi/pull/9171) by [@tiangolo](https://github.com/tiangolo).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  4. docs/en/docs/advanced/events.md

    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    Here, the `shutdown` event handler function will write a text line `"Application shutdown"` to a file `log.txt`.
    
    !!! info
        In the `open()` function, the `mode="a"` means "append", so, the line will be added after whatever is on that file, without overwriting the previous contents.
    
    !!! tip
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  5. docs/em/docs/advanced/events.md

    🚮 🔢 👈 🔜 🏃 🕐❔ 🈸 🤫 🔽, 📣 ⚫️ ⏮️ 🎉 `"shutdown"`:
    
    ```Python hl_lines="6"
    {!../../../docs_src/events/tutorial002.py!}
    ```
    
    📥, `shutdown` 🎉 🐕‍🦺 🔢 🔜 ✍ ✍ ⏸ `"Application shutdown"` 📁 `log.txt`.
    
    !!! info
         `open()` 🔢, `mode="a"` ⛓ "🎻",, ⏸ 🔜 🚮 ⏮️ ⚫️❔ 🔛 👈 📁, 🍵 📁 ⏮️ 🎚.
    
    !!! tip
        👀 👈 👉 💼 👥 ⚙️ 🐩 🐍 `open()` 🔢 👈 🔗 ⏮️ 📁.
    
        , ⚫️ 🔌 👤/🅾 (🔢/🔢), 👈 🚚 "⌛" 👜 ✍ 💾.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
Back to top