Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
a simple log server built with Nodejs
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
node_modules
.gitignore
README.textile
SAMPLE-email-config.json
SAMPLE-recipients.csv
console-backend.js
email-notify.js
file-backend.js
logserver.js

README.textile

A simple log collection server

Author: Maksim Lin

Introduction

Based on a concept from: http://lethain.com/log-collection-server-with-node-js/

Usage

Running the server

node logserver.js [backend-module-name]

you can set a shell env var PORT to override default port to lsiten on (8000).

backend-module-name is name of js module that implements the backend interface
eg.
node logserver.js file-backend

Sending log messages

eg. curl -X POST —data-binary ‘{ “mesg” : “pls log this mesg”, “level”: “error”, “category” : “device A” }’ http://localhost:8000

Viewing log messages

curl http://localhost:8000

Notifications

Notifications will be emailed to all email addresses specified in recipients.csv for any log data that is recieved
at level == “error”.

Something went wrong with that request. Please try again.