> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Log Entry Structure

## Article: Log Entry Structure in Studio Two

## Article Link: https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/log-entry-structure.md

## Article Content:

import { Property, PropertyList, ExpandableSection } from "@wix/docs-ui/content";

# Log Entry Structure in Studio Two

Wix stores each entry on the Logs page as a JSON object based on the [OpenTelemetry log data model](https://opentelemetry.io/docs/specs/otel/logs/data-model/). You see this object in the entry's Log details panel, and you get it when you click **Copy**.

You don't write this object yourself. Wix builds it from the message, level, tags, and contexts that your code passes to the monitoring client, and adds the other fields. To write entries, see [Write Log Messages in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/write-log-messages.md).

This reference describes entries as they appear on the Logs page. Entries that Wix forwards to an OpenTelemetry endpoint are OpenTelemetry log records, so some fields differ. See [Forward Logs to an OpenTelemetry Endpoint in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/forward-logs-to-an-open-telemetry-endpoint.md).

## Fields

<PropertyList bordered>
  <Property name="createdDate" type="string">
    Date and time Wix received the entry, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format with your browser's time zone offset. The Time column on the Logs page shows this value.
  </Property>
  <Property name="timeUnixNano" type="string">
    Time the logged event happened, in nanoseconds since the Unix epoch. For a message or a caught error, the time your code called the monitoring client. For an uncaught backend error, the time the error was thrown.
  </Property>
  <Property name="observedTimeUnixNano" type="string">
    Time Wix received the entry, in nanoseconds since the Unix epoch. Same moment as `createdDate`.
  </Property>
  <Property name="severityNumber" type="number">
    Severity as an OpenTelemetry severity number.

    <ExpandableSection name="Enum Values">
      <PropertyList>
        <Property name="5">
          `DEBUG`. Written when your code passes `level: 'debug'`.
        </Property>
        <Property name="9">
          `INFO`. Written when your code passes `level: 'info'` or no level.
        </Property>
        <Property name="13">
          `WARNING`. Written when your code passes `level: 'warning'`.
        </Property>
        <Property name="17">
          `ERROR`. Written when your code passes `level: 'error'`, when it calls `captureException()` without a `level`, and for every uncaught backend error.
        </Property>
      </PropertyList>
    </ExpandableSection>
  </Property>
  <Property name="severityText" type="string">
    Severity name that matches `severityNumber`.

    <ExpandableSection name="Enum Values">
      <PropertyList>
        <Property name="DEBUG" />
        <Property name="INFO" />
        <Property name="WARNING" />
        <Property name="ERROR" />
      </PropertyList>
    </ExpandableSection>
  </Property>
  <Property name="body" type="string">
    Log message. For an error, the error's name followed by its message. For example, `Error: Payment failed`.
  </Property>
  <Property name="appId" type="string">
    ID that Wix uses for your site's code. Every entry on your site's Logs page has the same value. It's the `appId` in your project's `wix.config.mjs` file.
  </Property>
  <Property name="siteId" type="string">
    Site ID.
  </Property>
  <Property name="attributes" type="object">
    Details about where the entry came from, plus the tags and contexts your code attached.

    Each field appears only when it applies to the entry.

    <ExpandableSection name="Child Properties">
      <PropertyList>
        <Property name="wix.request.id" type="string">
          ID of the request the entry belongs to. Entries written while handling the same request share an ID.
        </Property>
        <Property name="url.domain" type="string">
          Host that received the backend request.
        </Property>
        <Property name="url.path" type="string">
          Path of the backend request. For example, `/orders`.
        </Property>
        <Property name="code.file.path" type="string">
          Path of the bundled file in your site's built code that wrote the entry. For example, `/index.mjs`. It isn't the path of a file in your project.
        </Property>
        <Property name="code.line.number" type="number">
          Line number in the bundled file that wrote the entry.
        </Property>
        <Property name="code.column.number" type="number">
          Column number in the bundled file's line that wrote the entry.
        </Property>
        <Property name="wix.tag.<key>" type="string | number | boolean">
          Tag your code attached. For example, `tags: { feature: 'checkout' }` becomes `"wix.tag.feature": "checkout"`.

          Strings, booleans, and whole numbers keep their type. Decimal numbers are converted to JSON strings.
        </Property>
        <Property name="wix.context.<group>.<key>" type="string | number | boolean">
          Value from a context your code attached. For example, `contexts: { order: { id: 'A-100' } }` becomes `"wix.context.order.id": "A-100"`.

          Strings, booleans, and whole numbers keep their type. Other values, such as arrays and decimal numbers, are converted to JSON strings.
        </Property>
      </PropertyList>
    </ExpandableSection>
  </Property>
  <Property name="resourceAttributes" type="object">
    Details about the environment that wrote the entry.

    Entries that Wix forwards to an OpenTelemetry endpoint also have `wix.site.id` and `wix.app.id` resource attributes, with the same values as `siteId` and `appId`.
    <ExpandableSection name="Child Properties">
      <PropertyList>
        <Property name="service.namespace" type="string">
          Runtime that wrote the entry. Entries from Studio Two site code have the value `Headless`.
        </Property>
        <Property name="wix.producer" type="string">
          Where the code that wrote the entry ran.

          <ExpandableSection name="Enum Values">
            <PropertyList>
              <Property name="server">
                Backend code.
              </Property>
              <Property name="client">
                Code in the visitor's browser.
              </Property>
            </PropertyList>
          </ExpandableSection>
        </Property>
      </PropertyList>
    </ExpandableSection>
  </Property>
</PropertyList>

## Example

The following call writes a warning with a tag and a context:

```ts
import { monitoring } from '@wix/essentials';

// Inside the function that runs your code:
const logger = monitoring.getMonitoringClient();

logger.captureMessage('Payment provider responded slowly', {
  level: 'warning',
  tags: { feature: 'checkout' },
  contexts: { order: { id: 'A-100', total: 42 } },
});
```

Wix stores the resulting entry as the following object:

```json
{
  "createdDate": "2026-10-22T09:23:39.943941+03:00",
  "timeUnixNano": "1792650219112977784",
  "observedTimeUnixNano": "1792650219943183680",
  "severityNumber": 13,
  "severityText": "WARNING",
  "body": "Payment provider responded slowly",
  "appId": "5f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f",
  "siteId": "0a1b2c3d-4e5f-4a6b-8c7d-8e9f0a1b2c3d",
  "attributes": {
    "wix.request.id": "1792650218.7381726631031455",
    "url.domain": "abc123-5f1e2d3c4b5a4c6d8e7f-mysite.wix-app-host.com",
    "url.path": "/orders",
    "code.file.path": "/index.mjs",
    "code.line.number": 5516,
    "code.column.number": 48,
    "wix.tag.feature": "checkout",
    "wix.context.order.id": "A-100",
    "wix.context.order.total": 42
  },
  "resourceAttributes": {
    "service.namespace": "Headless",
    "wix.producer": "server"
  }
}
```

## See also

- [About Logs in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/about-logs-in-studio-two.md)
- [Write Log Messages in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/write-log-messages.md)
- [View Logs in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/view-logs.md)
- [Forward Logs to an OpenTelemetry Endpoint in Studio Two](https://dev.wix.com/docs/studio-two/test-your-site/work-with-logs/forward-logs-to-an-open-telemetry-endpoint.md)