# Audit Log Filter format - XML (new style)
The filter writes the audit log filter file in XML. The XML file uses
UTF-8.
The is the root element and this element contains
elements. Each element contains specific
information about an event that is audited.
For each new file, the Audit Log Filter plugin writes the XML
declaration and the root element tag. The plugin writes the closing
root element when closing the file. If the file is open, this
closing element is not available.
```xml
Audit
0_2023-03-29T11:11:43
2023-03-29T11:11:43
1
Command Start
1_2023-03-29T11:11:45
2023-03-29T11:11:45
0
1
query
Query
2_2023-03-29T11:11:45
2023-03-29T11:11:45
create_table
11
localhost
root[root] @ localhost []
CREATE TABLE t1 (c1 INT)
0
Query Start
3_2023-03-29T11:11:45
2023-03-29T11:11:45
0
11
create_table
CREATE TABLE t1 (c1 INT)
Query
4_2023-03-29T11:11:45
2023-03-29T11:11:45
create_table
11
localhost
root[root] @ localhost []
CREATE TABLE t1 (c1 INT)
0
Command End
5_2023-03-29T11:11:45
2023-03-29T11:11:45
0
1
query
```
The order of the attributes within an can vary. Certain attributes are in every element. Other attributes are optional and depend on the type of audit record.
The attributes in every element are the following:
| Attribute Name | Description |
| -------------- | ----------- |
| `` | The action that generated the audit record. |
| `` | The `` consists of a sequence number and a timestamp value. The sequence number is initialized when the plugin opens the audit log filter file. |
| `` | Displays the date and time when the audit event happened. |
The optional attributes are the following:
| Attribute Name | Description |
| ----------------------- | ------------- |
| `` | Contains the type of performed action. |
| `` | Contains the client connection identifier. |
| ``| Contains the client connection attributes. Each attribute has a `` and `` pair. |
| `` | Contains the type of connection security. |
| `` | Contains the database name. |
| `` | Contains the client's hostname. |
| `` | Contains the client's IP address. |
| `` | Contains the MySQL server version. |
| `` | Contains the user name used during an external authentication, for example, if the user is authenticated through an LDAP plugin. If the authentication plugin does not set a value or the user is authenticated using MySQL authentication, this value is empty. |
| `` | Contains the server's operating system. |
| `` | Contains the user name used by the server when checking privileges. This name may be different than ``. |
| `` | Contains the proxy user. If a proxy is not used, the value is empty. |
| `` | Contains the server ID. |
| `` | Contains the text of the SQL statement. |
| `` | Contains the startup options. These options may be provided by the command line or files. |
| `` | Contains the status of a command. A 0 (zero) is a success. A nonzero value is an error. |
| `` | Contains the status of a command, which either succeeds (0) or an error occurred (1). |
| `` | Contains the table name. |
| `` | Contains the user name from the client. This name may be different than ``. |
| `` | Contains the audit log filter format. |