1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! This module contains utilities for working with the file system and handling changes in the log
//! directory. Using the different components, you can customize how you want events to be received.
//!
//! Most strategies involve blocking until there are new entries available. This is done using the
//! [SyncBlocker](crate::fs::SyncBlocker) or [AsyncBlocker](crate::fs::AsyncBlocker). These can be used to block execution until a watcher unblocks
//! them.
//!
//! Watchers are used to keep track of file system changes, either for the whole log directory using
//! the [DirWatcher](crate::fs::DirWatcher) or a single file using the [FileWatcher](crate::fs::FileWatcher). These require
//! a blocker to be passed when constructing them (it doesn't matter which blocker is passed,
//! watchers don't care if you're running sync or async code) and when something changes, they
//! signal to unblock.
//!
//! The actual interaction with the log directory is facilitated using the [LogDir] iterator. It
//! iterates over all the log files in the correct order and returns the
//! [LogPath](crate::io::LogPath) which can be opened however you want and read using the various
//! iterators available in the [io module](crate::io).
//!
//! The [common](common) module contains some default implementations for reading log files and JSON
//! files.
pub use auto_detect_journal_path;
pub use LogFSError;
pub use common;
pub use DirWatcher;
pub use FileWatcher;
pub use LogDir;
pub use SyncUnblocker;
pub use SyncBlocker;
pub use Blocker;
pub use Unblocker;
pub use AsyncBlocker;
pub use AsyncUnblocker;
pub use common_async;
type BlockResult = ;