1.0.8 • Published 6 years ago

logmonster v1.0.8

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

logMonster

Post your app logs(JSON format) to server with a nice limited buffer.

options (default)

  // database name
  storeName: 'dataStore',
  // server log endpoint
  endPoint: 'http://localhost:8080/log.html',
  postMethod: 'POST',
  postTimeout: 15 * 1000,
  // buffer limit
  discardMax: 100 * 1000,
  postEncode: 'application/json', // default, others like: application/x-www-form-urlencoded
  // pack max-number of entries at a time
  entriesMax: 10,
  concurrentMax: 5,
  // sleep a little bit
  concurrentInterval: 3000,

usage

import LogMonster from 'logmonster';

// specify your own log endpoint.
const logMonster = new LogMonster({
  storeName: 'dataStore',
  endPoint: 'http://192.168.2.10/es/log' // you need to set this most likely.
})

// and enjoy pushing your JSON log object anywhere.
logMonster.push({
  mod: 'login',
  contenxt: 'xxxx',
  url: 'xxxx'
})

// logMonster.stop();

// logMonster.start();
1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago