Configure Cisco router to send syslog messages to syslog server

I needed to configure some Cisco routers to send syslog messages to a syslog server; here is how I did it.

Two things to note;

1. 192.168.5.190 is the IP address of the syslog server you are sending the messages to.

2. I was not receiving messages from the remote routers; after some troubleshooting I discovered I needed to tell the remote routers what interface to send the message out on. In my case is was BVI1.

A quick way to test connectivity from the router is with the ping command specifying the source interface.

router#ping 192.168.5.190 source BVI1

Here are the configuration steps

router#
router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#logging 192.168.5.190
router(config)#service sequence-numbers
router(config)#service timestamps debug datetime localtime show-timezone
router(config)#service timestamps log datetime localtime show-timezone msec
router(config)#logging facility local3
router(config)#logging trap informational
router(config)#logging buffered 1000000
router(config)#no logging console
router(config)#no logging monitor
router(config)#default logging rate-limit
router(config)#default logging queue-limit
router(config)#logging source-interface BVI1
router(config)#exit
router#sh logging
Syslog logging: enabled (0 messages dropped, 5 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)

No Active Message Discriminator.

No Inactive Message Discriminator.

Console logging: disabled
Monitor logging: disabled
Buffer logging: level debugging, 25 messages logged, xml disabled,
filtering disabled
Exception Logging: size (4096 bytes)
Count and timestamp logging messages: disabled
Persistent logging: disabled

No active filter modules.

Trap logging: level informational, 353 message lines logged
Logging to 192.168.5.190 (udp port 514, audit disabled,
link up),
353 message lines logged,
0 message lines rate-limited,
0 message lines dropped-by-MD,
xml disabled, sequence number disabled
filtering disabled
Logging Source-Interface: VRF Name:
BVI1

Log Buffer (1000000 bytes):

router#

source articles
https://supportforums.cisco.com/docs/DOC-16310#config
https://supportforums.cisco.com/thread/2188315
http://www.ciscopress.com/articles/article.asp?p=426638&seqNum=3