# Centralized server log (not web) on AX

**URL:** https://community.a10networks.com/t/centralized-server-log-not-web-on-ax/74
**Category:** aFleX
**Created:** [August 12, 2010, 12:37am UTC](https://community.a10networks.com/t/centralized-server-log-not-web-on-ax/74 "2010-08-12T00:37:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/bb9f186d33804d3044a0374e589f49fdf3be1328.png) [@system](https://community.a10networks.com/u/system)
#### Post date: [August 12, 2010, 12:37am UTC](https://community.a10networks.com/t/centralized-server-log-not-web-on-ax/74/1 "2010-08-12T00:37:13Z")

</div>

**Posted by ddesmidt** I guess that’s the “logging question week”!!! After one customer asking me “how to centralize web server log on AX” (see: [aFleX forum - Centralized web server log on AX](http://a10support.com/adc/index.php?option=com_kunena&Itemid=55&func=view&catid=7&id=32)), I just received a question from one A10 System Engineer on “how to centralized server log (not web) on AX”. That’s pretty much the same, but obviously this time I check the IP and port only (and not http information). _Note: Use AX 2.4.2P3 code or newer_ **Code:** `when CLIENT_ACCEPTED { # Set strings for the "client side" set time_client_connection [clock seconds] set date_time_request [clock format $time_client_connection -format {%Y-%m-%d %H:%M:%S}] set c_ip [IP::client_addr] set c_port [TCP::client_port] set vip_ip [IP::local_addr] set vip_port [TCP::local_port] } when SERVER_CONNECTED { # Set strings for the "server side" set s_ip [IP::server_addr] set s_port [TCP::server_port] # Format strings for logging set log_str "$date_time_request - $c_ip:$c_port => $vip_ip:$vip_port => $s_ip:$s_port" # write to syslog with Debug level log local0.7 $log_str # write to AX log (turn this for troubleshooting only, as you may have a lot of connections / second) # log $log_str }`
