Our simple UDP centralised log server
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


aTech Log Server

This simple service will run a centralised log server which can receive messages over UDP from applications and store them in a file.


  • You must have Ruby install on your host (1.8.7 or 1.9.3 are currently supported)
  • An internet connection

Installing & running the log server

git clone https://github.com/atech/log-server.git /opt/log-server
ln -s /opt/log-server/upstart.conf /etc/init/log-server.conf
start log-server

All logs by default are stored in /opt/log-server/logs/app_name/log_name.log.

Sending a log message to the server

The following code outlines how to send a message to the log server. You should replace with the IP address of your installed log server.

app_name  = 'sirportly'
log_name  = 'workers'
message   = "Hello there! This is a test of my log server..."
socket    = UDPSocket.new
data      = [app_name.bytesize, app_name, log_name.bytesize, log_name, message.bytesize, message, 0].pack('nA*nA*nA*n')
socket.send(data, 0, '', 4455)

This works well with our log server IO class which can easily be used with loggers.

logger = Logger.new(Atech::NetworkLogIO.new(:host => '', :app_name => 'demo', :log_name => 'app'))