Skip to content
LogoLogo

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.

Levelnautilus printsocean.js prints
Nonenothing ('silent')nothing
Errorerrors ('error')errors (ocean.js's default)
Warnwarnings and errors ('warn', nautilus's default)warnings and errors
Logmilestones too ('info')its log lines too
Verboseeverything ('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).