Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaWise committed Oct 24, 2023
1 parent b3fdc35 commit 955dd50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/readers.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ for await (const block of BulkParser.read(rawChunks)) {

Every [LogReader](#class-logreader) needs a source from which to read logs. The most common source is simply the filesystem directory that the logs were written to. LogDirectorySource does exactly that; it allows you to read log files from a directory on the filesystem. This class is not available in the browser.

> Note that log files generated by distinct server clusters running concurrently cannot be combined into a single log directory. If you have multiple server clusters running concurrently, their logs can only be read separately and then combined manually.
### new LogDirectorySource(dirname[, options])

- `dirname` [<string>][string] The path of the log directory.
Expand Down
2 changes: 2 additions & 0 deletions docs/writers.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

This class faciliates log rotation. It should be used within the master process of your [server cluster](https://nodejs.org/api/cluster.html). It keeps track of log files within a directory, detects when the log files get too big or too old, and deletes the oldest files when necessary. It also provides the filenames that your loggers should write to.

> Note that two (or more) server clusters must not write to the same log directory concurrently. Attempting to do so will likely lead to corrupted logs.
LogManager is a subclass of [EventEmitter][EventEmitter].

### new LogManager(dirname[, options])
Expand Down

0 comments on commit 955dd50

Please sign in to comment.