---
title: console
description: Adds messages to the log.
---

Adds messages to the log.

The console can be used to log information when running your script. The log may be useful when debugging your script, e.g. to examine values of variables.

## Methods

<span id="error" class="api-anchor"></span>

### error(message)

Logs an error message to the console.

```typescript
static error(message: any)
```

The message will have a distinctive appearance. Refer to `console.log(message)` to log informative message and `console.warn(message)` to log warnings.

You can also use the global function `logError(message)` which is a shorthand for `console.error`.

#### Parameters

**`message` `any`**

Message to log to the console.

<span id="log" class="api-anchor"></span>

### log(message)

Logs a message to the console.

```typescript
static log(message: any)
```

The message will have a default appearance. Refer to `console.error(message)` to log errors.

You can also use the global function `log(message)` which is a shorthand for `console.log`.

#### Parameters

**`message` `any`**

Message to log to the console.

<span id="logerror" class="api-anchor"></span>

### logError(message)

Logs an error message to the console.

```typescript
static logError(message: any)
```

The message will have a distinctive appearance. Refer to `console.log(message)` to log informative message and `console.warn(message)` to log warnings.

You can also use the global function `logError(message)` which is a shorthand for `console.error`.

#### Parameters

**`message` `any`**

Message to log to the console.

<span id="warn" class="api-anchor"></span>

### warn(message)

Logs a warning message to the console.

```typescript
static warn(message: any)
```

The message will have a distinctive appearance. Refer to `console.log(message)` to log informative messages and `console.error(message)` to log errors.

You can also use the global function `logWarning(message)` which is a shorthand for `console.warn`.

#### Parameters

**`message` `any`**

Message to log to the console.