How do I set up logging on my Cisco Switch ?
To setup logging on your Cisco switch is pretty straight forward, you enable logging, you tell it what to log and then were to send it.
Below is an example,
Enter configuration commands, one per line. End with CNTL/Z.
Hostname or A.B.C.D IP address of the logging host
buffered Set buffered logging parameters
console Set console logging level
facility Facility parameter for syslog messages
file Set logging file parameters
monitor Set terminal line (monitor) logging level
on Enable logging to all supported destinations
source-interface Specify interface for source address in logging transactions
trap Set syslog server logging level
Switch1(config)#logging trap <level>
Switch1(config)#logging facility <facility number>
Switch1(config)#logging source-interface fastEthernet 0/23
Switch1(config)#logging <syslog ip>
For further information regarding the logging commands click here.