Logging layer
Add log for every operation.
started
succeeded
finished
failed
Warn
Error
const op = new Operator("fs", { root: "/tmp" })const logging = new LoggingLayer();op.layer(logging.build()); Copy
const op = new Operator("fs", { root: "/tmp" })const logging = new LoggingLayer();op.layer(logging.build());
To enable logging output, set the RUST_LOG environment variable:
RUST_LOG
RUST_LOG=debug node app.js Copy
RUST_LOG=debug node app.js
Logging layer
Add log for every operation.
Logging
startedlog entry.succeeded: the operation is successful, but might have more to take.finished: the whole operation is finished.failed: the operation returns an unexpected error.Warn.Error.Examples
Output
To enable logging output, set the
RUST_LOGenvironment variable: