Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS
 
Chapter 9      Configuring Interfaces
Monitoring and Maintaining the Interface
Examples
The following example displays a summary of the operating states for the interface logging event using different combinations 
of global and interface logging settings:
global setting       interface setting       actual logging state
--------------       -----------------       --------------------
     on                    on                       on
     off                   on                       on
     on                    off                      off
     off                   off                      off
     on                    default(use-global)      on
     off                   default(use-global)      off
The following example displays the configuration and logging message output for link status and trunk status logging events:
//
// The global link status and trunk status logging events are enabled.
//
Switch# show running | include logging
show running | include logging
logging event link-status global
logging event trunk-status global
Switch#
//
// The interface link status and trunk status logging settings
// are set to default values, which follow regardless of the global
// setting.
//
Switch# show running interface g1/4
Building configuration...
Current configuration: 97 bytes
!
interface GigabitEthernet1/4
 switchport trunk encapsulation dot1q
 switchport mode trunk
end
Switch#
//
// The trunk status logging messages for the interface are 
// displayed whenever the interface trunking status is changed.
// Here we change the other end node's trunking encapsulation 
// from dot1q to isl.
//
3d00h: %DTP-5-ILGLCFG: Illegal config(on,isl--on,dot1q) on Gi1/4
3d00h: %DTP-5-ILGLCFG: Illegal config(on,isl--on,dot1q) on Gi1/4
3d00h: %DTP-5-ILGLCFG: Illegal config(on,isl--on,dot1q) on Gi1/4
//
// The link and trunk status logging message for the interface 
// are displayed whenever the interface link status is changed.
// Here we do a "shut" and "no shut" on the other end link node.
Command Purpose
Switch(config-if)# logging event link-status 
global
Enables global link status logging.
Switch(config-if)# no logging event 
link-status global
Disables global link status logging.