<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/TorLogLevel",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor0A8LogLevelO"
  },
  "title" : "TorLogLevel"
}
-->

# TorLogLevel

Tor’s five log-severity levels, surfaced as a typed, ordered enum.

```
enum TorLogLevel
```

## Overview

Mirrors the severity keywords defined by control-spec.txt §4.1.10 and
Tor’s `torrc` `Log` directive: `DEBUG` < `INFO` < `NOTICE` < `WARN` <
`ERR`. The raw values are the exact protocol strings, so callers can
round-trip a level through the control protocol without custom
encoding. `Comparable` is implemented by severity so that
`level >= .warn` is meaningful as a filter predicate.

> Note: Conformance is `Sendable` + `Hashable` + `Comparable` +
> `CaseIterable`. Use `TorLogLevel.allCases` to render a dropdown or
> drive a matrix test.

> Important: Tor emits a very high volume of `.debug` / `.info` events
> during bootstrap. Filter at the subscription level (via
> ``doc://Tor/documentation/Tor/TorControlClient/subscribe(to:)``) rather than at the UI layer to
> avoid pushing unnecessary data across the control socket.

## Topics

### Levels

[`TorLogLevel.debug`](/documentation/Tor/TorLogLevel/debug)

High-volume developer diagnostics.

[`TorLogLevel.info`](/documentation/Tor/TorLogLevel/info)

Routine operational information.

[`TorLogLevel.notice`](/documentation/Tor/TorLogLevel/notice)

Noteworthy but non-error events.

[`TorLogLevel.warn`](/documentation/Tor/TorLogLevel/warn)

Recoverable problems and deprecation notices.

[`TorLogLevel.err`](/documentation/Tor/TorLogLevel/err)

Fatal or near-fatal errors.

