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

# rb.log

> Write lines to the script's Logs at info, warn, error or debug level.

`rb.log` writes lines to the script's **Logs**, with one function per level. A
script reaches for it to report what it is doing, and to mark a problem as a
warning or an error rather than an ordinary line.

This script writes one line at each level, then one with `print`:

```luau theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
-- rebind: min_sdk=3.9.0 name=example version=1.0.0
local width, height = 1920, 1080

rb.log.info("screen", width, height)   -- screen	1920	1080
rb.log.debug("ready", true, nil)       -- ready	true	nil
rb.log.warn("no profile saved, using defaults")
rb.log.error("could not open the profile")
print("print writes at info level too")
```

| Signature | Level |
| - | - |
| `rb.log.info(...any) -> ()` | info |
| `rb.log.warn(...any) -> ()` | warn |
| `rb.log.error(...any) -> ()` | error |
| `rb.log.debug(...any) -> ()` | debug |

Each takes any number of values and joins them with tabs, like `print`. In the
script's **Logs**, a line is tagged with the file that wrote it when that is not
the entry file. `print(...)` and `log(...)` write at info level.


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