Skip to content
Tony Woode edited this page Apr 8, 2015 · 1 revision

Basics

  • The logger is running and logging to /var/log/openshare-.
  • Consoled atm but will get daemonised later.

Setup

  • Log requests should be equivalent to this command, which you should be able to run (variants of) and see entries place into logfiles on 192.168.1.27:

$ amqp-publish -u amqp://192.168.1.27/%2F -r logger -b"{text:'that was even'}"

Notes

  • the amqp-publish command can be found in the ubuntu amqp-tools package
  • yes, the %2F is necessary. Horrid, isn't it?
  • the api spec specifies JSON for the body, but I note that actually existing code is sending strings

AMQP Parameters:

host: 192.168.1.27
exchange: /
routing-key: logger
  • the logger does not reply

Log Message Format

  • The logger receives a string for the message parameter which it parses as JSON.

  • The level fields is recognised and used to set the log level.

The log file format is a series of lines, each containing a JSON object with these fields:

* message: contents of parameter `message.text`
* timestamp
* level: contents of parameter `message.level`. One of:
         debug,info,warn,error,fatal
  • If the message parameter is not in the correct format it is logged with an abusive message.

  • There will be a "loggy"-style query interface to get the log contents.

Clone this wiki locally