You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if anyone could explain this restriction, where the flumelog must have a local directory. It seems like the dir name is only used to create the location for the leveldb, but is there another reason for this design?
functioncreate(){closed=falseif(!log.filename)thrownewError('flumeview-level can only be used with a log that provides a directory')returnLevel(path.join(dir,name),{keyEncoding: charwise,valueEncoding: 'json'})}
normally, you have a flumelog which is a file, and then a bunch of flumeviews, which also probably have files. To avoid a configuration nightmare, the views just created files or directories based on their name, next to the log. flumelog-memory doesn't have a log, it just creates a temporary log in memory. some other views (such as flumeview-reduce) notice this, and when used with a memory log, provide a memory view, but flumeview-level doesn't have an easy way to do this, so it throws an error instead, because it doesn't know where to put the file.
really the memory log thing is just for testing, but to make sure that it really really works, I usually test with a real log anyway.
@christianbundy yes that would work. sometimes maybe print something in that case though because accidentially passing a memory log when you ment not to could be a mistake
I was wondering if anyone could explain this restriction, where the flumelog must have a local directory. It seems like the dir name is only used to create the location for the leveldb, but is there another reason for this design?
https://github.com/flumedb/flumeview-level/blob/master/index.js#L27
The text was updated successfully, but these errors were encountered: