# log reference

> Messages to the script log.

`log.*` writes messages with the time of the bar being processed.

## Functions

### log.debug {#log-debug}

```flowscope
log.debug(message: string) -> void
```

Writes a debug-level message to the script log.

`message` is the text to write and cannot be null. Use this for messages that help you develop or debug a script.

Your data plan limits the number of log messages. Messages beyond the limit
are dropped, and the number dropped is reported.

| Parameter | Type |
|---|---|
| `message` | `string` |

**Available in** Handlers and functions called from handlers.

### log.error {#log-error}

```flowscope
log.error(message: string) -> void
```

Writes an error-level message to the script log.

`message` is the non-null text to write at the highest log severity.
Writing an error message does not stop the script. Log volume is capped by
your data plan. Messages beyond the cap are dropped, and the number dropped
is reported.

| Parameter | Type |
|---|---|
| `message` | `string` |

**Available in** Handlers and functions called from handlers.

### log.info {#log-info}

```flowscope
log.info(message: string) -> void
```

Writes an info-level message to the script log.

`message` is the text to write and cannot be null. Use this for normal script events you want to record.

Your data plan limits the number of log messages. Messages beyond the limit
are dropped, and the number dropped is reported.

| Parameter | Type |
|---|---|
| `message` | `string` |

**Available in** Handlers and functions called from handlers.

### log.warn {#log-warn}

```flowscope
log.warn(message: string) -> void
```

Writes a warning-level message to the script log.

`message` is the text to write and cannot be null. Use this for unexpected conditions that the script can handle.

Your data plan limits the number of log messages. Messages beyond the limit
are dropped, and the number dropped is reported.

| Parameter | Type |
|---|---|
| `message` | `string` |

**Available in** Handlers and functions called from handlers.
