# LogRecord

Source: /tuil/docs/reference/packages/logging/api/log-record
Locale: en

interface exported by @mwillbanks/tuil-logging.



{/* Generated by tooling/docs/generate-reference.ts. */}

## interface [#interface]

Public interface exported by `@mwillbanks/tuil-logging`.

```ts
export interface LogRecord {
  readonly timestamp?: bigint;
  readonly observedTimestamp?: bigint;
  readonly severityNumber?: number;
  readonly severityText?: string;
  readonly body: unknown;
  readonly attributes: Readonly<Record<string, unknown>>;
  readonly resource: Readonly<Record<string, unknown>>;
  readonly scope?: {
    readonly name?: string;
    readonly version?: string;
  };
  readonly traceId?: string;
  readonly spanId?: string;
  readonly flags?: number;
  readonly eventName?: string;
  readonly source: LogSource;
  readonly original: unknown;
  readonly diagnostics: readonly LogDiagnostic[];
  readonly duplicateCount?: number;
  readonly rateLimited?: boolean;
  readonly sampled?: boolean;
}
```

## Members [#members]

| Member              | Type                                                                            | Required | Description                                                                                                           | Related types                                                          |
| ------------------- | ------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `timestamp`         | `bigint \| undefined`                                                           | No       | The `timestamp` member uses the `bigint \| undefined` contract.                                                       | —                                                                      |
| `observedTimestamp` | `bigint \| undefined`                                                           | No       | The `observedTimestamp` member uses the `bigint \| undefined` contract.                                               | —                                                                      |
| `severityNumber`    | `number \| undefined`                                                           | No       | The `severityNumber` member uses the `number \| undefined` contract.                                                  | —                                                                      |
| `severityText`      | `string \| undefined`                                                           | No       | The `severityText` member uses the `string \| undefined` contract.                                                    | —                                                                      |
| `body`              | `unknown`                                                                       | Yes      | The `body` member uses the `unknown` contract.                                                                        | —                                                                      |
| `attributes`        | `Readonly<Record<string, unknown>>`                                             | Yes      | The `attributes` member uses the `Readonly<Record<string, unknown>>` contract.                                        | —                                                                      |
| `resource`          | `Readonly<Record<string, unknown>>`                                             | Yes      | The `resource` member uses the `Readonly<Record<string, unknown>>` contract.                                          | —                                                                      |
| `scope`             | `&#123; readonly name?: string; readonly version?: string; &#125; \| undefined` | No       | The `scope` member uses the `&#123; readonly name?: string; readonly version?: string; &#125; \| undefined` contract. | —                                                                      |
| `traceId`           | `string \| undefined`                                                           | No       | The `traceId` member uses the `string \| undefined` contract.                                                         | —                                                                      |
| `spanId`            | `string \| undefined`                                                           | No       | The `spanId` member uses the `string \| undefined` contract.                                                          | —                                                                      |
| `flags`             | `number \| undefined`                                                           | No       | The `flags` member uses the `number \| undefined` contract.                                                           | —                                                                      |
| `eventName`         | `string \| undefined`                                                           | No       | The `eventName` member uses the `string \| undefined` contract.                                                       | —                                                                      |
| `source`            | `LogSource`                                                                     | Yes      | The `source` member uses the `LogSource` contract.                                                                    | [`LogSource`](/tuil/docs/reference/packages/logging/api/log-source)         |
| `original`          | `unknown`                                                                       | Yes      | The `original` member uses the `unknown` contract.                                                                    | —                                                                      |
| `diagnostics`       | `readonly LogDiagnostic[]`                                                      | Yes      | The `diagnostics` member uses the `readonly LogDiagnostic[]` contract.                                                | [`LogDiagnostic`](/tuil/docs/reference/packages/logging/api/log-diagnostic) |
| `duplicateCount`    | `number \| undefined`                                                           | No       | The `duplicateCount` member uses the `number \| undefined` contract.                                                  | —                                                                      |
| `rateLimited`       | `boolean \| undefined`                                                          | No       | The `rateLimited` member uses the `boolean \| undefined` contract.                                                    | —                                                                      |
| `sampled`           | `boolean \| undefined`                                                          | No       | The `sampled` member uses the `boolean \| undefined` contract.                                                        | —                                                                      |

## Parameters [#parameters]

This declaration has no public members.

## Returns [#returns]

This declaration does not return a value.

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`LogDiagnostic`](/tuil/docs/reference/packages/logging/api/log-diagnostic)
* [`LogSource`](/tuil/docs/reference/packages/logging/api/log-source)

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/logging/src/index.ts)

## Package [#package]

[@mwillbanks/tuil-logging](/tuil/docs/reference/packages/logging)
