What's changed
Large changes related to working with IO and the file system through the new reader API. Finally got an new reader API together that I'm happy with. The new API splits up the different kinds of readers and functionality into different models, which each their specific role when creating an application. This means that by default you'll need to combine these different models yourself in order to do what the old readers automatically did for you. However, the fs::common and fs::common_async modules provide some common strategies and combinations akin to the old API and makes it easy to add new common strategies in the future without changing any behavior in the underlying models.
These changes were made because the old API, while it worked for the strategies that they were made for, they could not really be used in any other way than the specific parsing strategy they were created to handle. The new API makes this composable and now support additional functionalities like reading over some generic Read allow for in-memory parsing without a file system which makes it easier to work with for example in server side application (one of my original goals for this project.)
This version is available on crates.io for testing.
Changelog
- Added the
iomodule which handles parsing the contents of the log files and adds support for reading from sources that are not the file system. - Added the
fsmodule for reading and watching logs and files on the file system. - Moved
auto_detect_journal_pathfrom thejournalmodule to thefsmodule. - The different json file handlers (for parsing 'Cargo.json', 'Status.json' etc.) have been removed in favor of the
fs::JsonFile. - Remove the
journalmodule. Most things are already covered by thefsmodule, but some common strategies will be added before the full release (things likeAnyJsonFilefor receiving updates from any of the JSON files using an enum etc,) - Removed the readers from the
logsmodule; use theioandfsmodules instead. - Removed the
statemodule for now. The current version relies heavily on theJournalEventmodel which was removed. State handling will eventually return as a separate crate as it's largely a standalone module that's a layer on top of the library as a whole. Though the final decision for splitting this into a crate is still not really set in stone.
Full Changelog: 0.12.2...0.13.0-rc.1