---
title: Console
summary: Interface for logging to stdout for live log monitoring.
url: https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/globals/interface.Console/
---

**Kind:** Interface  
**Module:** [globals](https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/globals/)  
**Package:** @fastly/js-compute 4.0.1  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L875

Interface for logging to stdout for
[live log monitoring](https://developer.fastly.com/learning/compute/testing/#live-log-monitoring-in-your-console).

**Note**: This implementation accepts any number of arguments. String representations of each object are appended
together in the order listed and output. Unlike the `Console` built-in in browsers and Node.js, this implementation
does not perform string substitution.

**Note**: Messages are prefixed with the respective log level, starting with an upper-case letter, e.g. `"Log: "`.

## Methods

### assert

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L876

```javascript
assert(condition?: boolean, ...data: Array<any>): void
```

**Parameters**

- `condition`: `boolean` (optional)
- `...data`: `Array<any>`

**Returns**

`void`

### clear

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L877

```javascript
clear(): void
```

**Returns**

`void`

### count

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L878

```javascript
count(label?: string): void
```

**Parameters**

- `label`: `string` (optional)

**Returns**

`void`

### countReset

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L879

```javascript
countReset(label?: string): void
```

**Parameters**

- `label`: `string` (optional)

**Returns**

`void`

### debug

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L880

```javascript
debug(...data: Array<any>): void
```

**Parameters**

- `...data`: `Array<any>`

**Returns**

`void`

### dir

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L881

```javascript
dir(item?: any, options?: any): void
```

**Parameters**

- `item`: `any` (optional)
- `options`: `any` (optional)

**Returns**

`void`

### dirxml

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L882

```javascript
dirxml(...data: Array<any>): void
```

**Parameters**

- `...data`: `Array<any>`

**Returns**

`void`

### error

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L883

```javascript
error(...data: Array<any>): void
```

**Parameters**

- `...data`: `Array<any>`

**Returns**

`void`

### group

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L884

```javascript
group(...data: Array<any>): void
```

**Parameters**

- `...data`: `Array<any>`

**Returns**

`void`

### groupCollapsed

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L885

```javascript
groupCollapsed(...data: Array<any>): void
```

**Parameters**

- `...data`: `Array<any>`

**Returns**

`void`

### groupEnd

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L886

```javascript
groupEnd(): void
```

**Returns**

`void`

### info

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L887

```javascript
info(...data: Array<any>): void
```

**Parameters**

- `...data`: `Array<any>`

**Returns**

`void`

### log

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L888

```javascript
log(...data: Array<any>): void
```

**Parameters**

- `...data`: `Array<any>`

**Returns**

`void`

### table

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L889

```javascript
table(tabularData?: any, properties?: Array<string>): void
```

**Parameters**

- `tabularData`: `any` (optional)
- `properties`: `Array<string>` (optional)

**Returns**

`void`

### time

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L890

```javascript
time(label?: string): void
```

**Parameters**

- `label`: `string` (optional)

**Returns**

`void`

### timeEnd

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L891

```javascript
timeEnd(label?: string): void
```

**Parameters**

- `label`: `string` (optional)

**Returns**

`void`

### timeLog

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L892

```javascript
timeLog(label?: string, ...data: Array<any>): void
```

**Parameters**

- `label`: `string` (optional)
- `...data`: `Array<any>`

**Returns**

`void`

### trace

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L893

```javascript
trace(...data: Array<any>): void
```

**Parameters**

- `...data`: `Array<any>`

**Returns**

`void`

### warn

**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L894

```javascript
warn(...data: Array<any>): void
```

**Parameters**

- `...data`: `Array<any>`

**Returns**

`void`
