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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
write modifications/events to append only logs. process those changes sequentially. like an _changes feed but in a file
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"