After you configure the Border Gateway Protocol (BGP) to record peer status changes and event information, BGP keeps logs when the peer status changes or an event occurs.
If an error occurs on a BGP peer connection, BGP generates an error code and subcode. If the error occurs on the local device, the local device changes its local state machine to disconnect its BGP peer and sends a BGP Notification message to its BGP peer. After the BGP peer receives the Notification message, the BGP peer records the error code and subcode carried in the message and changes its state machine.
By default, BGP records peer status changes and event information in the system log files. The record includes: BGP error codes and subcodes, BGP state machine changes, and whether BGP Notification messages are sent. The system log files serve as a reference to locate network connectivity faults.
If you do not want BGP to record peer status changes or event information, run the undo peer log-change command. After you run the undo peer log-change command, BGP records only the last peer status change in the log file. You can run the display bgp peer loginfo command to view this log.