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

# UgCore.Logger

> Leveled console output.

<Badge color="purple">Shared</Badge> Runs in your resource and prints in its console.

```lua theme={null}
UgCore.Logger.Debug(message, ...)
UgCore.Logger.Info(message, ...)
UgCore.Logger.Warn(message, ...)
UgCore.Logger.Error(message, ...)
```

<ResponseField name="message" type="any" required>Converted with `tostring`.</ResponseField>
<ResponseField name="..." type="any">When present, formatted into `message` with `string.format`.</ResponseField>

```lua theme={null}
UgCore.Logger.Info('%d players online', #GetPlayers())
UgCore.Logger.Warn('Shop %s is closed', shopId)
```

```text theme={null}
[INFO] 12 players online
[WARN] Shop downtown is closed
```

`Debug` prints only when debug is on: `debug = true` in `config/core.lua`, or `set ug-core:Debug true`.


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