> ## Documentation Index
> Fetch the complete documentation index at: https://lua.nlcrack.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Log

> Output to game UI.

## Functions

| Function | Description |
| - | - |
| `log.chat(...)` | Print to the in-game chat |
| `log.console(...)` | Print to the game console |

Arguments are converted with `tostring` and concatenated.

## Example

```lua theme={null} theme={null}
events.on('player_hurt', function(e)
    local dmg = e:get_int('dmg_health')
    local victim = e:get_pawn('userid')
    if victim and victim:is_enemy() then
        log.chat('Hit for ' .. dmg)
    end
end)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.