setLogLevel
Sets the log level of nautilus, and of ocean.js, for the whole process.
Usage
import { , } from '@deltadao/nautilus'
.(.) Returns
void
Parameters
level
- Type:
LogLevel(ocean.js's)
The level, mapped to nautilus's own levels. For backward compatibility it is also set on
ocean.js's LoggerInstance, which decides what ocean.js itself prints.
| Level | nautilus prints | ocean.js prints |
|---|---|---|
None | nothing ('silent') | nothing |
Error | errors ('error') | errors (ocean.js's default) |
Warn | warnings and errors ('warn', nautilus's default) | warnings and errors |
Log | milestones too ('info') | its log lines too |
Verbose | everything ('trace') | everything, including its debug lines |
Without a call, nautilus prints warnings and errors, and ocean.js errors only.
ocean.js's lines go through nautilus's logger by default, redacted (the
oceanjs option of configureLogging), so a
line prints when both levels let it through: ocean.js's decides which lines it emits,
nautilus's which of those print.
The level controls how much is printed, never unredacted data: at every level, nautilus's
events have session ids, signatures, tokens and URLs redacted. The raw values need
setDebug (see the debugging guide).