npm/nicely-placed-modification-logs

Name: nicely-placed-modification-logs

Owner: npm

Description: write modifications/events to append only logs. process those changes sequentially. like an _changes feed but in a file

Created: 2015-12-03 22:44:19.0

Updated: 2018-04-23 13:46:28.0

Pushed: 2016-08-12 13:26:43.0

Homepage: null

Size: 30

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

nicely-placed-modification-logs

write modifications/events to append only logs. process those changes sequentially. like an _changes feed but in a file

work in progress
dir = __dirname+"/data"
modlogs = require('nicely-placed-modification-logs')
logs = modlogs({dir:__dirname+"/data"})

.on("error",function(err){
nsole.log(err!)


.write({data:"important stufff"},function(err){
 saved!


s = modlogs.read({dir:,since:0})

('data',function(event){
nsole.log(event.seq)
 [log name]-[bytewise encoded byte offset]
 000000000-420000000000000000
nsole.log(event.data)
 "hi!\n"  


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.