> For the complete documentation index, see [llms.txt](https://docs.percona.com/percona-xtrabackup/9.7/llms.txt).

# Improved log statements

Percona XtraBackup is an open-source command-line utility. Command-line tools have limited interaction with the background operations and the logs provide the progress of an operation or more information about errors.

The error logs did not have a standard structure and the log statements varied in the following ways:

- The backup log statement header has the name of the module, `xtrabackup`, which generated the statement but no timestamp:

```shell
xtrabackup: recognized client arguments: --parallel=4 --target-dir=/data/backups/ --backup=1
```

The output should be similar to the following:

Expected output

```text
./bin/xtrabackup version 9.7.2-3 based on MySQL server 9.7 Linux (x86_64) (revision id: b0f75188ca3)
```

- The copy-back log statement has a timestamp but no module name. The timestamp is a mix of UTC and the local timezone.

```text
220322 19:05:13 [01] Copying undo_001 to /data/backups/undo_001
```

- The following prepare log statements do not have header information, which makes diagnosing an issue more difficult.

```text
Completed space ID check of 1008 files.
Initializing buffer pool, total size = 128.000000M, instances = 1, chunk size =128.000000M
Completed initialization of buffer pool
If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
```

## Log statement structure

The improved log structure is displayed in the backup, prepare, move-back/copy-back error logs.

Each log statement has the following attributes:

- Timestamp - a timestamp for when the event occurred in a UTC format.
- Severity - the severity level of a statement indicates the importance of an event.
- ID - this identifier is currently not used but may be used in future versions.
- Context - the name of the module that issued the log statement, such as XtraBackup, InnoDB, or Server.
- Message - a description of the event generated by the module.

An example of a `prepare` log that is generated with the improved structure. The uniformity of the headers makes it easier to follow an operation’s progress or review the log to diagnose issues.

Expected output

```text
2026-10-13T17:24:07.116234-00:00 0 [Note] [MY-011825] [Xtrabackup] This target seems to be not prepared yet.
2026-10-13T17:24:07.130815-00:00 0 [Note] [MY-011825] [Xtrabackup] xtrabackup_logfile detected: size=8388608, start_lsn=(36616867)
2026-10-13T17:24:07.135585-00:00 0 [Note] [MY-011825] [Xtrabackup] using the following InnoDB configuration for recovery:
2026-10-13T17:24:07.135620-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_data_home_dir = .
2026-10-13T17:24:07.135625-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_data_file_path = ibdata1:12M:autoextend
2026-10-13T17:24:07.136805-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_log_group_home_dir = .
2026-10-13T17:24:07.136957-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_redo_log_capacity = 8388608
2026-10-13T17:24:07.138693-00:00 0 [Note] [MY-011825] [Xtrabackup] inititialize_service_handles suceeded
2026-10-13T17:24:07.141331-00:00 0 [Note] [MY-011825] [Xtrabackup] using the following InnoDB configuration for recovery:
2026-10-13T17:24:07.141346-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_data_home_dir = .
2026-10-13T17:24:07.141349-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_data_file_path = ibdata1:12M:autoextend
2026-10-13T17:24:07.141356-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_log_group_home_dir = .
2026-10-13T17:24:07.141359-00:00 0 [Note] [MY-011825] [Xtrabackup] innodb_redo_log_capacity = 8388608
2026-10-13T17:24:07.141364-00:00 0 [Note] [MY-011825] [Xtrabackup] Starting InnoDB instance for recovery.
2026-10-13T17:24:07.141369-00:00 0 [Note] [MY-011825] [Xtrabackup] Using 104857600 bytes for buffer pool (set by --use-memory parameter)
```
