Use it when sorting or filtering syslog messages on the server by source.
Facilities
A syslog facility labels the source category of a message (for example local0–local7 for network devices) so collectors can route messages from different sources to different files.
1. Syslog facility categorises the source (local0–7 for devices).
2. Servers route by facility.
3. Use distinct facilities per device class.
4. Default on IOS is local7.
5. Align with SIEM parsing.
device message → facility tag → server routing
Context & applicabilityCommon mistakes · platform/version boundaries
- All devices using the default facility, so logs cannot be separated on the server.
- Different facility numbering expectations between vendors.
- Changing the facility without updating server filters.
Operational reference
Fast context before you go deeper.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Severity numbers run 0 most severe through 7 debugging
- A configured threshold includes that severity and more severe messages
- Console, buffer, terminal monitor and remote logging are distinct destinations
- Excessive debugging can harm a production control plane; use bounded capture and rollback.
show logging— facility in messagesshow running-config | include logging facility— facility setting
ReferenceWhat it is1 section · depth on demand
Using facilities
IOS uses local7 by default (logging facility local5 changes it). Use different facilities per device group (routers local5, switches local6, firewalls local4) so the syslog server can write them to separate files or indexes. On Linux, rsyslog filters like local6.* /var/log/switches.log.
ReferenceWhy it matters2 sections · depth on demand
When to use it
Use it for incident reconstruction, alerting and durable operational history.
Overview
A syslog facility labels which part of a system produced a message. Network devices usually send everything under one of the local0–local7 facilities, and the collector uses that label to decide where messages are stored. Giving different device groups different facilities is a simple way to keep switch, router and firewall logs apart without complex parsing rules.
Syslog facilities identify the source category: kern, user, mail, daemon, auth, syslog, local0–local7 (network devices typically use local7 by default on Cisco).
logging facility local6
logging host 10.0.0.50
Assign different local facilities per device class (switches local6, firewalls local5) so the syslog server can route them into separate files or indexes.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
The facility tells a syslog server which part of the system a message came from
Cisco IOS XE messages have the form seq no:timestamp: %FACILITY-SEVERITY-MNEMONIC: description. The FACILITY in the message (LINK, LINEPROTO, OSPF, SYS) names the IOS component. The syslog facility (local0–local7) is a separate value, sent to the syslog server and used there to sort messages. The Catalyst 9300 guide states that the server facility defaults to Local7.
C9300(config)# service timestamps log datetime msec localtime show-timezone
C9300(config)# service sequence-numbers
C9300(config)# logging host 10.10.50.20
C9300(config)# logging facility local5
C9300(config)# logging trap informational
C9300# show logging | include Trap|facility
Trap logging: level informational, 142 message lines logged
Logging to 10.10.50.20 (udp port 514, audit disabled,
000143: Nov 27 10:12:03.441 CET: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/7, changed state to down
| Field | Example | Meaning |
|---|---|---|
| Sequence number | 000143 | With service sequence-numbers |
| Timestamp | Nov 27 10:12:03.441 CET | With service timestamps log; disabled by default |
| IOS facility | LINEPROTO | Component that generated the message |
| Severity | 5 | 0 (most severe) to 7 |
| Mnemonic | UPDOWN | Event type |
Using syslog facilities on the server
| Device group | Facility |
|---|---|
| Core and distribution switches | local5 |
| Access switches | local6 |
| Routers and firewalls | local7 |
# rsyslog example on the server
local5.* /var/log/network/core.log
local6.* /var/log/network/access.log
Combine the facility split with filters on the IOS facility (for example %OSPF- or %SEC_LOGIN-) for alerting. Enable timestamps with milliseconds and a time zone. Without them, correlating events across devices is guesswork.
Documented example, not captured output.
Facility codes
| Code | Facility |
|---|---|
| 0 | kern |
| 1 | user |
| 3 | daemon |
| 4 | auth |
| 10 | authpriv |
| 16–23 | local0–local7 |
PRI value in the message = facility × 8 + severity (e.g. local7.notice = 23×8+5 = 189).
ReferenceConfiguration & state1 section · depth on demand
Configuration (Cisco IOS)
logging host 10.0.0.50
logging facility local5
logging trap informational
Documented example, not captured output. On the server (rsyslog): local5.* /var/log/network/switches.log.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IP Services → Syslog → Facilities. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc5424.html · confidence 94%