---
title: Log
slug: web-experimentation/api/vpvM-log
docTags: 
createdAt: 2026-08-05T20:56:17.000Z
---

Print execution logic to your browser's console.

Tell Optimizely Web Experimentation to output its log to the browser's console log (default is `OFF`). You can also do this by using the query parameter `optimizely_log={level}`.

If you set the `level` to the currently configured log level, this function has no effect other than generating a warning.

### Syntax

```javascript
window["optimizely"].push(log);
```

### Parameters

| Parameter and Type  | Child Attribute                      | Description                                                                                                                                   |
| ------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **log** *LogObject* | N/A                                  | An object with the `type` field set to `log`. Required.                                                                                       |
| **type** *string*   | Child attribute of type `LogObject`. | The argument indicating that you are using the log function. Required.                                                                        |
| **level** *string*  | Child attribute of type `LogObject`. | One of the following: `OFF` – No logs, `ERROR` – Errors only, `WARN` – Warning and above, `INFO` – Info and above, `DEBUG` – Debug and above. |

### Example call

```javascript
window["optimizely"].push({
  "type": "log",
  "level": "INFO"
})
```
