Socket
Book a DemoInstallSign in
Socket

jilo-server

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jilo-server

Logging server

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

jilo

Logging server

Install

$ npm install -g jilo-server

Setup

Create a capped collection in Mongo:

> db.createCollection('log', { capped: true, size: 100000 })

For more info, see the MongoDB documentation.

Start the server:

$ jilo-server --key=secret [options]

All clients must connect to the server using the token secret.

By default the server will start on port 3000 and connect to a database named jilo on localhost.

API

Query the server GET /:

curl 'http://localhost:3000/?token=secret&query=%7B%22format%22:%22string%22%7D'

Possible query params:

  • query
  • filter
  • sort
  • skip
  • limit

The server will stream log entries to the client as they are logged (kind of like the lovely tail -f). Note: If you use either sort or limit streaming will be disabled for obvious reasons.

Send a log entry to the server POST /:

curl -i \
     -X POST \
     -d '{"host":"localhost","data":"foo","format":"string"}' \
     'http://localhost:3000/?token=secret'

JSON format

Example:

{
  format: 'json',
  timestamp: '2013-01-01T00:00:00.000Z'
  id: 123,
  level: 'info',
  user: 123,
  host: 'example.com',
  group: 'web',
  responseTime: 23,
  version: '1.7.1',
  data: {
    foo: 'bar'
  }
}

Debug

DEBUG=jilo-server node cli.js --key=secret

FAQs

Package last updated on 14 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts