Configuring Log Filters
Many event categories contain filters so you can further refine the type of information that the system logs. For example, when logging BGP connections, you can limit the information logged to a specific access class, peer, route map, or virtual router.
You define filters when you set the log severity for an event category. The online Help shows the options you can set for each filter.
The following example creates a filter that logs BGP connection information at the debug severity level on traffic that matches access list ListOne, and is incoming traffic to virtual router default.
host1(config)#log severity debug bgpevents ?access-class Select an access list for the filterin Select import/in direction for the filterout Select export/out direction for the filterpeer Select a peer IP address for the filterroute-map Select a route map for the filterrouter Identify an instance of a virtual router<cr>host1(config)#log severity debug bgpevents access-class ?WORD The access listhost1(config)#log severity debug bgpevents access-class ListOne ?filtering-router Identify virtual router where access-class/route-map are definedin Select import/in direction for the filterout Select export/out direction for the filterroute-map Select a route map for the filter<cr>host1(config)#log severity debug bgpevents access-class ListOne route-map ?WORD The route maphost1(config)#log severity debug bgpevents access-class ListOne route-map default ?filtering-router Identify virtual router where access-class/route-map are definedin Select import/in direction for the filterout Select export/out direction for the filter<cr>host1(config)#log severity debug bgpevents access-class ListOne route-map default inThe next example limits the logging of PPP debug events to traffic to or from the POS interface in slot 2/0.
host1(config)#log severity debug ppp ?atm Specify an ATM PPP interfacefastEthernet Specify a fastEthernet interfacegigabitEthernet Specify a gigabitEthernet interfacemlppp Specify an MLPPP network interfacepos Specify a POS PPP interfaceserial Specify a serial PPP interface<cr>host1(config)#log severity debug ppp pos 2/0To obtain a list of the filters available in each event category, see Chapter 2, Event Categories.