---
title: "The LogRecord model"
manual: "TYPO3 Explained"
version: "12.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:logging-model@12.4"
source: "ApiOverview/Logging/Model/Index.rst"
rendered: "2026-10-21T15:29:37+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v12 has reached end-of-life as of April 30th 2026 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v12 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# The LogRecord model {#logging-model}

All logging data is modeled using `\TYPO3\CMS\Core\Log\LogRecord`.

This model has the following properties:

-   **requestId**

    A unique identifier for each request which is created by the
    [TYPO3 bootstrap](https://docs.typo3.org/permalink/t3coreapi:bootstrapping@12.4).

-   **created**

    The timestamp with microseconds when the record is created.

-   **component**

    The name of the [logger](https://docs.typo3.org/permalink/t3coreapi:logging-logger@12.4) which created the log record,
    usually the fully-qualified class name where the logger has been
    instantiated.

-   **level**

    An integer severity level from
    [\\Psr\\Log\\LogLevel](https://docs.typo3.org/permalink/t3coreapi:logging-logger-log@12.4).

-   **message**

    The log message string.

-   **data**

    Any additional data, encapsulated within an array.

The API to create a new instance of LogRecord is
`\TYPO3\CMS\Core\Log\Logger:log()` or one of the
[shorthand methods](https://docs.typo3.org/permalink/t3coreapi:logging-logger-shortcuts@12.4).

The `LogRecord` class implements the `\ArrayAccess` interface so that
the properties can be accessed like a native array, for example:
`$logRecord['requestId']`.
It also implements a `__toString()` method for your convenience,
which returns the log record as a simplified string.

A log record can be processed using [log processors](https://docs.typo3.org/permalink/t3coreapi:logging-processors@12.4)
or [log writers](https://docs.typo3.org/permalink/t3coreapi:logging-writers@12.4). Log processors are meant to add
values to the `data` property of a log record. For example,
if you would like to add a stack trace, use
`\TYPO3\CMS\Core\Log\Processor\IntrospectionProcessor`.

Log writers are used to write a log record to a particular target,
for example, a log file.
