# Windows Event Log

TKTail shows the Windows Event Log next to your log files: Application, System, Security and the
*Applications and Services Logs* of this computer, and saved `.evtx` files. Open a log and you see
its recent events at once, then the new ones as Windows writes them (**LIVE**), one row per
event. Select an event to read its message, its fields and its XML.

TKTail only reads the Event Log. It never clears a log, never deletes or changes events, never
enables a disabled log and never asks for administrator rights. (The Event Log is not ETW: these
are the persistent logs Event Viewer shows, not high-rate trace sessions.)

## Opening an event log

In the [Explorer](https://tktail.dev/help/explorer/), expand **Windows Event Logs**:

```
Windows Event Logs
  Application
  Security
  Setup
  System
  Forwarded Events
  Applications and Services Logs
    Microsoft
      Windows
        PowerShell
          Operational
        ...
```

*Screenshot: The Explorer: Favorites > Events lists the saved orders-demo.evtx; Windows Event Logs lists Application, Security (access denied for this account), Setup, System, Forwarded Events and Applications and Services Logs*

Saved `.evtx` files are files: they appear in folders under **Files**, like any other file, and
open from there. **Windows Event Logs** holds the logs of this computer.

- **Double-click** a log (or select it and press **Enter**) to open it: the newest 1,000 events,
  then LIVE. A log that is already open just gets its tab back.
- Right-click a log for **Open (Recent + LIVE)**, **LIVE Only** (no history: only events from
  now on), **Open with Filter...** (see [Choosing what to see](https://tktail.dev/help/windows-event-log/#choosing-what-to-see)) and
  **Properties** (type, enabled, log file, size, number of events, last write).
- **Drag** a log onto a pane to open it there, or near a pane's edge to open it in a new split
  beside what you look at; right-click > **Open in New Split** does the same next to the active
  pane ([Drag sources into the workspace](https://tktail.dev/help/viewing-logs/#drag-sources-into-the-workspace)). A log
  that is open already is shown, not opened twice.
- The list of logs is read when you first expand *Windows Event Logs* - TKTail does nothing with
  the Event Log until then. **Refresh** in the right-click menu reads it again.
- Analytic and Debug logs are hidden; right-click > **Show Analytic and Debug Logs** lists them.
  A disabled log is shown dim: TKTail does not enable logs.
- A log this account may not read is marked **access denied** (see [Permissions](https://tktail.dev/help/windows-event-log/#permissions)).

You can also open a log from the command line (`tktail eventlog open System`), and a saved
`.evtx` file with **File > Open** (choose *Saved event logs*), by dragging it onto TKTail or with
`tktail eventlog open C:\Logs\saved.evtx`. A saved file shows its events; it has no LIVE part.

## The event tab

The tab is named after the log (*System*, *PowerShell/Operational*); its tooltip shows the full
name, the computer and the filter.

```
Time                     Level        Provider                  Event ID  Message
2026-10-05 20:17:31.115  Information  Service Control Manager   7036      The Demo Service entered the running state.
2026-10-05 20:17:33.412  Error        Service Control Manager   7031      The Demo Service terminated unexpectedly...
```

*Screenshot: An event tab filtered to one provider (a demo event log): its events arrive LIVE (Information, Warning, Error), the Inspector shows the source and the tab's numbers*

- One row per event, oldest at the top, the newest at the bottom, where LIVE events arrive.
  Times are local times (the Summary shows the UTC time too).
- **Critical** and **Error** are drawn in the error colour, **Warning** in the warning colour,
  **Verbose** dim - the same colours as levels in log files.
- The message column shows the first part of the message on one line. Messages are prepared in
  the background, newest first: for a moment a row may show **…** instead.
- Rows can scroll sideways when the window is narrow (Shift+wheel, the horizontal scroll bar,
  Left / Right).

### LIVE and PAUSED

Like a log file, an event tab is **LIVE** (following the newest event) or **PAUSED**.

- Clicking a row, moving up with the keyboard or scrolling up pauses the view. New events keep
  arriving: the badge and the status bar count them (**PAUSED · +37 events**).
- **End**, **F5** or **Go Live** return to the newest event.
- **Stop Monitoring** (right-click) stops receiving new events; the rows stay. **Start
  Monitoring** continues right after the last event shown - nothing in between is skipped.
- A paused tab keeps receiving events, and it still keeps only its newest 100,000. When a busy log
  pushes out rows the paused view held, the badge and the status bar say so (**PAUSED · +12,400
  events · 2,400 older left the tab**), the Inspector shows *While paused*, and a search says those
  rows were not searched. They are still in Windows; **Go Live** shows the newest events.

*Screenshot: The same tab paused on an older event: the badge and the status bar say PAUSED · +5 events while the new events are added below*

The status bar shows the state (**LIVE**, **PAUSED +n**, **STOPPED**, **LOADING HISTORY**,
**RECONNECTING**, **ACCESS DENIED**; when LIVE cannot keep up also *catching up* or *overloaded* -
see [below](https://tktail.dev/help/windows-event-log/#when-a-log-writes-faster-than-tktail-reads)), the current event (*Event 1,002 / 1,002*),
the number of events in the tab and the LIVE rate in **events/s** (events, not lines), and the
filter (click it to change it).

### Rows that are not events

The tab says when something happened to the log itself, in a dim row:

| Row | Meaning |
|---|---|
| *Event log was cleared or reset* | The log was cleared while the tab was open (record numbers started again). Rows above are from before. |
| *LIVE reconnected - no events missing* | The connection to the Event Log service was lost and restored; TKTail continued after the last event it had. |
| *LIVE resumed without a bookmark - events may be missing here* | It could not continue after the last event (the log was cleared or overwritten in between). |
| *LIVE skipped ahead to stay current · 94,812 events (records ...)* | The log wrote faster than TKTail could read for a while; TKTail continued from the newest events. The row names the records it passed over - they are still in the Windows log (see [below](https://tktail.dev/help/windows-event-log/#when-a-log-writes-faster-than-tktail-reads)). |
| *Monitoring stopped* / *started again* | You stopped or started monitoring. |

### How much a tab keeps

A tab keeps the newest **100,000** events (about 64 MB at most); older ones leave the tab - they
stay in Windows, of course. The Inspector shows how many rows the tab has and how many left it.

### When a log writes faster than TKTail reads

A tab reads every event as long as it can keep up - thousands per second. When a log writes faster
for a long time (a program or script in a loop), TKTail stays responsive and says what happened:

*Screenshot: A synthetic flood: the Inspector counts the source gaps, the lag and what was kept*

- The status bar says it in words: **LIVE · catching up (4 s behind)** while TKTail works through
  waiting events, **LIVE · overloaded, 12,400 skipped** after it had to continue from the newest
  events (and **LIVE · 12,400 skipped** later). Its tooltip and the Inspector (*Keeping up*,
  *Skipped*, *Source gaps*) give the numbers.
- After about **10 seconds** behind, LIVE **skips ahead** to the newest events. A row says exactly
  what was passed over - the number of events, their record numbers and when they were written.
  They are still in the Windows log. With a filter the number is an upper bound ("up to"): not
  every record in the range matches the filter.
- During a flood, messages are prepared for the rows on screen (and for searches and exports), not
  for every event that arrives - and while LIVE moves faster than they can be prepared, its rows show
  **…**; pause the tab to read them.
- A full log overwrites its oldest events. If it overwrote events before TKTail read them, the tab
  shows *LIVE resumed without a bookmark - events may be missing here* - those events are gone
  from Windows too. The Inspector counts them as *Source gaps*.
- A search over a tab with such rows says so: Find adds *the tab has 1 gap*; Find in All Open
  Files and Advanced Search report the search as *Incomplete*. The same when a flooded tab let
  events go (its 100,000 rows) before the search reached them - *n events left the tab before the
  search reached them*: pause the tab or stop monitoring to search a fixed set of events.
- Evidence an alert keeps of an event log is *Partial* when the log no longer holds the start of
  its time window.

## The selected event: Summary, Fields, XML

Select an event and open the **RECORD** view in the bottom panel (Enter, or double-click a row).
It shows the event in the same panes it uses for log records:

*Screenshot: An event tab with monitoring stopped: the selected Error event in RECORD (Summary: level and provider, channel, event ID, computer, record ID, the event's data) and in the Inspector*

- **Summary** (the default): the level and provider, the time (local and UTC), channel,
  provider, event ID, task, computer, user, process and thread, record ID, the **message** and
  the first fields of the event's data.
- **Fields**: every field Windows recorded - `TimeCreated`, `Level` (with the provider's own
  name of the level - names of levels, tasks, opcodes and keywords come from Windows, in its display
  language), `Provider`, `EventID`, `Task`, `Opcode`, `Keywords`, `EventRecordID`,
  `Channel`, `Computer`, `UserID`, `ProcessID`, `ThreadID`, `ActivityID`, `Version`, the message
  and the event's data (`EventData` with its names; unnamed values as `Data[1]`, `Data[2]` ...;
  `UserData` as paths such as `LogFileCleared.SubjectUserName`). Fields Windows did not record
  are not shown.
- **XML**: the event exactly as Windows renders it, indented for reading.

*Screenshot: The same event in View: Fields - Level 2 with the level's name, Provider, EventID, EventRecordID, Channel, Computer, the message and the event's data*

The **Inspector** shows the same event's fields, and above them the source (channel, computer,
history, filter, state) and the tab's numbers (rate, delivery time, how LIVE keeps up, retention, skipped
events and gaps, memory).

**No message?** Some events have no message text on this computer: the program that wrote them
is not installed here, its message resources are missing, or the log comes from another
computer. TKTail then shows the event's own data as the message ("*Event data*"); the event is
complete otherwise.

## Choosing what to see

**Filter Events** chooses which events the tab shows. Open it with right-click > **Filter...**,
by clicking the filter in the status bar (*All events* when there is none), or from the Explorer:
right-click a log > **Open with Filter...**.

| Field | Shows only events ... |
|---|---|
| Levels | of the checked levels: Critical, Error, Warning, Information (includes *LogAlways*, as in Event Viewer), Verbose. None checked: every level. |
| Provider | of these providers - pick one of the tab's providers from the list or type names; several are separated by `;` |
| Event IDs | with these IDs: `7031`, ranges `7034-7036`, several separated by commas; a leading `-` excludes (`-1000`) |
| Text | whose message, provider or event ID contains the text (not case-sensitive) |
| Advanced | that match your own Event Log XPath query, which replaces levels, providers and IDs |

*Screenshot: Filter Events: levels, provider, event IDs, text, Advanced XPath, and the query Windows runs for them*

Below the fields the dialog shows the query Windows runs for them, as you type. A mistake (an
ID above 65535, a reversed range) is shown there in red and OK keeps the dialog open. **Clear**
empties every field.

Levels, providers and event IDs are filtered by Windows itself, so a filter on a big log does not
read every event. The text is matched by TKTail while the events are read: their messages are
formatted for it, which is slower on a big log - combine it with a level or provider when you can.

**Advanced**: tick it to edit the XPath yourself - it starts with the query of the fields above.
Write one XPath expression, as in Event Viewer's *XML* tab between `<Select ...>` and
`</Select>`. Two examples for the System log:

```
*[System[(Level=1 or Level=2) and TimeCreated[timediff(@SystemTime) <= 86400000]]]
*[System[Provider[@Name='Service Control Manager']] and EventData[Data[@Name='param4']='BITS']]
```

The first shows critical and error events of the last 24 hours; the second the events of the
Service Control Manager about the BITS service (field `param4` holds the service's name - the
Fields view shows the names of an event's data).

A whole `<QueryList>` is not accepted: it can name other logs, and a tab shows exactly one.
Windows checks the XPath when the tab runs it; if it is not valid the tab says so (*The query is
not valid Event Log XPath: ...*) - open Filter Events again to correct it.

Changing the filter starts the tab again with the new query; rows of the old filter never mix
with the new ones. The current filter is in the status bar, the tab's tooltip and the Inspector.

Right-click an event for quick filters and the history:

*Screenshot: The event's context menu: Copy Event / Message / Fields / XML / Event ID / Provider, Export Events..., Filter..., Show Only Provider / Event ID / Level, Clear Filter, Go Live, History, Refresh, Inspect Event (RECORD), Show Metrics Around This Event, Properties*

| Item | What it does |
|---|---|
| Show Only Provider "..." | Only events of this provider |
| Show Only Event ID ... | Only events with this ID |
| Show Only Level ... | Only events of this level |
| Clear Filter | All events again |
| History > LIVE only / Last 100 / Last 1,000 / Last 10,000 / Available history | How much history the tab reads |
| Refresh | Read the history again |
| Show Metrics Around This Event | A Metrics View beside the tab, paused at the event's time - CPU, memory, disk or a process then (Trial / Pro; [Metrics](https://tktail.dev/help/metrics/#from-a-log-to-metrics)) |

## Finding events

**Ctrl+F** in an event tab opens the find bar. A search looks at each event's **message**, its
**provider**, its **event ID** and its **level** (Match case, regular expressions and Wrap as for
files); the first event that matches is selected, the tab pauses and the match is highlighted
in its row. The find bar says where the match is (*Found in the message*, *in the provider* ...).
**F3** / **Enter** finds the next event, **Shift+F3** the previous one. Without a selected event
the search starts at the events on screen (in LIVE: the newest).

*Screenshot: Find in an event tab: "event 50:" found in the message, highlighted in its row*

- A search covers the events the tab holds (up to 100,000) and up to the first 8,192 characters of
  each message (what the tab keeps of it). To search the whole log on the computer, use Filter
  Events or `tktail eventlog query --text`.
- Messages that are still being prepared are prepared first - a search never skips a message.
  If Windows does not provide a message within 15 seconds, the search continues without it and
  says how many events were searched without their message.
- Field conditions (`level = ERROR`) are for log records; for events use Filter Events.

**Find in All Open Files** (**Ctrl+Shift+F**, or the search box in the toolbar) and
[Advanced Search](https://tktail.dev/help/bottom-panel/#advanced-search) search the open event tabs too - in the
background, so a large tab never holds up the window, with a time range if you set one (an
event's time is its TimeCreated). Their results show the log's name, the event (time, level, provider, ID and the
message around the match) and the log (`eventlog://local/System`) where a file shows its path -
an event has no line number. Double-click a result (or press Enter) to go to its tab with the
event selected; if the event has left the tab in the meantime, the status bar says so. *Copy
Match* copies the matched text, *Copy Source URI* the log's address.

*Screenshot: Search Results of the toolbar's search over the open sources: 8 matches in 1 event log - time, level, provider, ID and message of each event, and the log's address (eventlog://local/...)*

## Copying

| Command | Copies |
|---|---|
| Copy Event / Copy *n* Events (Ctrl+C) | The selected events, one per line, with their complete messages |
| Copy Message | The selected event's complete message |
| Copy Fields | Its fields, one per line (name, value, meaning) |
| Copy XML | Its XML |
| Copy Event ID / Copy Provider | The value alone |

Select several events with Shift+click, Shift+arrows or Ctrl+A. When some messages are still
being prepared, Copy waits for them (the status bar says so) - copies never contain "…".

## Exporting

Right-click > **Export Events...** (or **File > Export** while an event tab is active) writes the
events to a file: **TSV**, **CSV** or **JSON Lines**, all events of the tab or only the selected
ones. Each event is one row with the columns `Time` (local), `TimeUtc`, `Level`, `Provider`,
`EventID`, `RecordID`, `Task`, `Opcode`, `Keywords`, `ProcessID`, `ThreadID`, `Log` (the channel,
or the saved file's path) and `Message`.

Messages are complete: the export first prepares every message the tab has not prepared yet
(the status bar counts them down). A message longer than the 8,192 characters a tab keeps, an
event the log no longer holds and a message Windows did not provide in time are marked in the
file (`[message continues: ...]`, `[message not formatted in time]`) - never cut silently. Rows
such as *Event log was cleared* are exported too (`-- Event log was cleared or reset`), so a gap
in the events stays visible. TSV has no room for a tab or a line break inside a value: there they
become spaces (CSV and JSON Lines keep the message exactly). Saving events as a native `.evtx`
file is not available.

## Keyboard

Up / Down, Page Up / Page Down, Home move the current event (Shift extends the selection); End
returns to LIVE; Left / Right scroll sideways; Ctrl+A selects all events; Ctrl+C copies them;
Ctrl+F / F3 / Shift+F3 find; Enter opens the event in RECORD; Ctrl+wheel zooms like the file viewer.

An AI assistant reads and searches the event logs open in TKTail - open System or Application yourself when the
investigation needs them; it cannot open a channel on its own ([AI assistance](https://tktail.dev/help/ai-assistance/#metrics-and-windows-events)).

## Permissions

Application, System and most *Applications and Services Logs* can be read by every user.
The **Security** log can only be read by administrators and members of the **Event Log
Readers** group. Without that right TKTail shows *Access denied* in the tab and in the tree;
nothing else is affected. TKTail never elevates itself: to read Security, run TKTail as a member
of Event Log Readers (an administrator can add your account), or as administrator if your
organization allows it.

## Command line

```
tktail eventlog list                                    the logs of this computer (--all: Analytic and Debug too)
tktail eventlog open System                             open a tab: the newest 1,000 events, then LIVE
tktail eventlog open Application --last 100 --level error,warning
tktail eventlog open System --live                      only new events
tktail eventlog open System --since 2h --provider "Service Control Manager"
tktail eventlog open C:\Logs\saved.evtx                 a saved log (history only)
tktail eventlog query System --last 20 --level error    print events (no window)
tktail eventlog query Application --id 1000 --output json
```

`eventlog query` prints the newest matching events, oldest first; it exits with 1 when no event
matches and 4 when access is denied. Details: docs/CLI.md.

## Troubleshooting

| What you see | What to do |
|---|---|
| *Access denied* | See [Permissions](https://tktail.dev/help/windows-event-log/#permissions). |
| A log is missing in the tree | It may be Analytic or Debug (right-click > Show Analytic and Debug Logs), or installed after the tree was read (Refresh). |
| *RECONNECTING* | The Event Log service did not answer (restarting, very busy). TKTail retries after 1, 2, 5, 10 s and then every 30 s, and continues after the last event it had. |
| *LIVE · overloaded, n skipped* | The log writes faster than TKTail can read; TKTail continued from the newest events. See [When a log writes faster than TKTail reads](https://tktail.dev/help/windows-event-log/#when-a-log-writes-faster-than-tktail-reads). A filter on level or provider lets TKTail read fewer events. |
| *Event data* instead of a message | The program that wrote the event has no message text on this computer (see above). |
| Rows show **…** | Messages are prepared in the background, visible rows first; they appear within moments. |
| A saved `.evtx` shows some events without a message, or their details as *no longer in the log* | The file combines events of several logs. TKTail finds an event in a saved file by its position, which needs record numbers that rise through the file - as in every file Windows saves from one log. Open the original logs, or files saved from one log each. |

## Not available yet

Event logs of other computers, saving events as `.evtx`, and alerts on events (alerts watch log
files).

---

The HTML page: https://tktail.dev/help/windows-event-log/
