Skip to main content
Safe Chain’s logging level determines how much output it prints alongside your package manager commands. You can configure it per-command or as a default for your session or environment.

Priority order

When multiple sources are set, Safe Chain applies the following priority:
  1. CLI argument --safe-chain-logging (highest)
  2. Environment variable SAFE_CHAIN_LOGGING
  3. Default: normal

Logging levels

LevelDescription
silentSuppresses all Safe Chain output except when malware is blocked. The package manager output is written to stdout as normal, and Safe Chain only writes a short message if it has blocked malware and causes the process to exit.
normalStandard informational output. This is the default.
verboseDetailed diagnostic output from Safe Chain. Useful for troubleshooting issues or understanding what Safe Chain is doing behind the scenes.

Configuration

Pass --safe-chain-logging=<level> to any wrapped package manager command. This takes highest priority and applies only to that invocation.
npm install express --safe-chain-logging=silent
npm install express --safe-chain-logging=verbose
Valid values: silent, normal, verbose
The normal level is used as the fallback whenever the configured value is missing or not one of the three valid options.

Build docs developers (and LLMs) love