npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

sf-debug-log

v0.2.5

Published

Manage Salesforce Debug Logs

Downloads

69

Readme

sf-debug-log

A Salesforce CLI plugin to make managing debug logs easier.

I built this because I found the official sf CLI was missing some commands I regularly need. For example, I wanted to put a specific user under debug and retrieve only their logs, delete logs more easily, or set a new debug level from the command line. This plugin adds those missing pieces and more to make debugging faster.

Features

  • Create trace flags for any user in the org, selecting the debug level and time.
  • List all debug levels in the org.
  • Retrieve Apex logs for a specific user or all users in the org.
  • Delete Apex logs for a specific user or all users in the org.

Install

sf plugins install sf-debug-log

Commands

sf trace new

Create a new trace flag.

USAGE
  $ sf trace new -o <value> -d <value> [-u <value>] [-t <value>] [-f]

FLAGS
  -d, --debuglevel=<value>      [default: SFDC_DevConsole] The debug level for the trace flag.
  -f, --force                   Force the creation of a new trace flag, even if one already exists for the user.
  -o, --targetusername=<value>  (required) Username or alias of the target Salesforce org.
  -t, --time=<value>            [default: 60] The number of minutes to trace.
  -u, --user=<value>            [default: current user] Username, Name, or ID of the user for whom you want to retrieve the logs.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  This command is used to create a trace flag for a specific user in the Salesforce org.

EXAMPLES
  sf trace new -o DeveloperEdition -u "Raffaele Preziosi" -t 10 -d "MyDebugLevel"

sf debug retrieve

Retrieve Apex log files from the Salesforce platform.

USAGE
  $ sf debug retrieve -o <value> [-u <value>] [-t <value>] [-d <value>] [-a]

FLAGS
  -a, --all-users               Retrieve log files for all users.
  -d, --folder=<value>          [default: .sfdx/tools/debug/logs] The folder where the retrieved log files will be stored.
  -o, --targetusername=<value>  (required) Username or alias of the target Salesforce org.
  -l, --limit=<value>           [default: 100] The max number of log files to retrieve.
  -t, --time=<value>            The number of minutes to retrieve log files for.
  -u, --user=<value>            [default: current user] Username, Name, or ID of the user for whom you want to retrieve the logs.

GLOBAL FLAGS
  --json  Format output as json.

EXAMPLES
  sf debug retrieve -o DeveloperEdition -u "Raffaele Preziosi" -t 10

sf debug delete

Delete Apex log files from a Salesforce org.

USAGE
  $ sf debug delete -o <value> [--json] [-u <value>] [-t <value>] [-a]

FLAGS
  -a, --all-users               Delete log files for all users.
  -o, --targetusername=<value>  (required) Username or alias of the target Salesforce org.
  -t, --time=<value>            Delete logs older than the specified number of minutes.
  -u, --user=<value>            [default: current user] Username, Name, or ID of the user for whom you want to retrieve the logs.

GLOBAL FLAGS
  --json  Format output as json.

EXAMPLES
  sf debug delete -o DeveloperEdition -u "Raffaele Preziosi" -t 10

sf debuglevel list

List all DebugLevels in the org.

USAGE
  $ sf debuglevel list -o <value>

FLAGS
  -o, --targetusername=<value>  (required) Username or alias of the target Salesforce org.

GLOBAL FLAGS
  --json  Format output as json.

EXAMPLES
  sf debuglevel list -o DeveloperEdition

sf debuglevel new

Create a new DebugLevel.

USAGE
  $ sf debuglevel new -o <value> [-n <value>]

FLAGS
  -n, --name=<value>            (required) The developer name of the new DebugLevel.
  -o, --targetusername=<value>  (required) Username or alias of the target Salesforce org.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Create a new DebugLevel assigning level for each category.

EXAMPLES
  sf debuglevel new -o DeveloperEdition -n "DebugLevel"