---
title: LogExpression type | Wartiva GraphQL API
description: LogExpression represents an nftables expression for logging packet information. This allows for debugging, auditing, or general monitoring of network traffic.
url: https://wartiva.com/api-docs/types/log-expression.html
updated: 2026-10-07
---

Endpoint configuration · GraphQL type

# `LogExpression` type

LogExpression represents an nftables expression for logging packet information. This allows for debugging, auditing, or general monitoring of network traffic.

## Fields

| Field Name | Description |
|---|---|
| `level` - [`NftLogLevel!`](https://wartiva.com/api-docs/types/nft-log-level.html) | The severity level of the log message. |
| `flags` - [`NftLogFlags!`](https://wartiva.com/api-docs/types/nft-log-flags.html) | Flags to control which additional information is included in the log message. |
| `key` - [`NftLogKey!`](https://wartiva.com/api-docs/types/nft-log-key.html) | A key to categorize or configure specific logging behavior. |
| `snaplen` - [`Uint32!`](https://wartiva.com/api-docs/types/uint32.html) | The snapshot length (number of bytes) of the packet to include in the log. |
| `group` - [`Int!`](https://wartiva.com/api-docs/types/int.html) | The nflog group to send the log message to (if NFLOG flag is set), returned as an unsigned 16-bit integer. |
| `qThreshold` - [`Int!`](https://wartiva.com/api-docs/types/int.html) | The queue threshold for nflog, defining how many packets to queue before sending to userspace, returned as an unsigned 16-bit integer. |
| `data` - [`String!`](https://wartiva.com/api-docs/types/string.html) | An optional prefix string to add to the beginning of the log message. |

## Used by

- [`ChainExpression`](https://wartiva.com/api-docs/types/chain-expression.html) union: A union of all possible nftables chain expression types.

## Example

### Example

```json
{
  "level": "EMERGENCY",
  "flags": "TCPSEQ",
  "key": "UNSPEC",
  "snaplen": "1073741824",
  "group": 987,
  "qThreshold": 987,
  "data": "xyz789"
}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
