Basic configuration for a router is like this (in global conf mode):
"logging trap debugging" (set level of syslog messages which will be sent to syslog server)
"logging XXX.XXX.XXX.XXX" (set IP address of the syslog server)
For a PIX firewall:
"logging on" (globally turn on logging)
"logging trap debugging" (same as above)
logging host outside XXX.XXX.XXX.XXX (set IP address of the syslog server and interface through which this host can be accessed).
Hope this helps.
Detailed info for routers:
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/fun_c/fcprt3/fcd302.htm#1001168
for PIXs:
http://www.cisco.com/en/US/products/sw/secursw/ps2120/products_configuration_guide_chapter09186a008008cfc3.html#1021079