# JavaScript logging libraries

JavaScript logging libraries record what an application does as it runs, from debug messages to structured events with severity levels. A logger writes each record to a destination such as the console, a file, or a telemetry pipeline. These libraries give developers the records they need to trace errors in production services.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [debug](#debug) | 3.7B | 11.5K | Sep 2025 | MIT |
| [obug](#obug) | 623.4M | 92 | Sep 2026 | MIT |
| [@opentelemetry/sdk-logs](#opentelemetry-sdk-logs) | 322.0M | 3.5K | Nov 2026 | Apache-2.0 |
| [pino](#pino) | 300.7M | 18.3K | Oct 2026 | MIT |
| [consola](#consola) | 260.6M | 7.3K | Mar 2025 | MIT |
| [Sentry Node SDK](#sentry-node) | 217.2M | 8.8K | Nov 2026 | MIT |
| [winston](#winston) | 141.2M | 24.5K | Dec 2025 | MIT |
| [loglevel](#loglevel) | 126.9M | 2.7K | Sep 2024 | MIT |

Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[debug](#debug) has the most monthly downloads in this comparison, at 3.7B.

## Capabilities

| Library | Severity levels | Built-in local JSON lines |
| --- | --- | --- |
| [debug](#debug) | No | No |
| [obug](#obug) | No | No |
| [@opentelemetry/sdk-logs](#opentelemetry-sdk-logs) | Yes | No |
| [pino](#pino) | Yes | Yes |
| [consola](#consola) | Yes | No |
| [Sentry Node SDK](#sentry-node) | Yes | No |
| [winston](#winston) | Yes | Yes |
| [loglevel](#loglevel) | Yes | No |

## Libraries

### debug

[GitHub](https://github.com/debug-js/debug) · [npm](https://www.npmjs.com/package/debug) · [Docs](https://github.com/debug-js/debug#readme)

Provides a debugging utility for Node.js and the browser.

- Downloads / mo: 3.7B
- Stars: 11.5K
- Last release: 4.4.3
- License: MIT
- Capabilities: [From the debug docs](https://github.com/debug-js/debug#readme)

```sh
npm install debug
```

**expressjs/express** (69.6K stars)

[expressjs/express](https://github.com/expressjs/express) 

```javascript
function set(setting, val) {
  if (arguments.length === 1) {
    // app.get(setting)
    return this.settings[setting];
  }

  debug('set "%s" to %o', setting, val);

  // set value
  this.settings[setting] = val;

  // trigger matched settings
  switch (setting) {
    case 'etag':
      this.set('etag fn', compileETag(val));
      break;
    case 'query parser':
      this.set('query parser fn', compileQueryParser(val));
      break;
    case 'trust proxy':
      this.set('trust proxy fn', compileTrust(val));

      // trust proxy inherit back-compat
      Object.defineProperty(this.settings, trustProxyDefaultSymbol, {
        configurable: true,
        value: false
      });

      break;
  }

  return this;
}
```

[lib/application.js](https://github.com/expressjs/express/blob/43fca52d28a422c8be48fd489cbd4f2d6152bab6/lib/application.js#L351-L383) · [More projects using debug →](https://dashboard.exa.ai/playground/search?q=debug%20GitHub%20projects)

**Quickstart**

```javascript
const debug = require('debug')('app');
debug('hello');

```

From [README.md](https://cdn.jsdelivr.net/npm/debug@4.4.3/README.md)

### obug

[GitHub](https://github.com/sxzz/obug) · [npm](https://www.npmjs.com/package/obug) · [Docs](https://github.com/sxzz/obug#readme)

Forks debug with TypeScript and ESM support.

- Downloads / mo: 623.4M
- Stars: 92
- Last release: 3.0.0
- License: MIT
- Capabilities: [From the obug docs](https://github.com/sxzz/obug#readme)

```sh
npm install obug
```

**vitejs/vite** (84.0K stars)

[vitejs/vite](https://github.com/vitejs/vite) 

```javascript
export function createDebugger(
  namespace: ViteDebugScope,
  options: DebuggerOptions = {},
): Debugger['log'] | undefined {
  const log = debug(namespace)
  const { onlyWhenFocused, depth } = options

  if (depth && log.inspectOpts && log.inspectOpts.depth == null) {
    log.inspectOpts.depth = options.depth
  }

  let enabled = log.enabled
  if (enabled && onlyWhenFocused) {
    const ns = typeof onlyWhenFocused === 'string' ? onlyWhenFocused : namespace
    enabled = !!DEBUG?.includes(ns)
  }

  if (enabled) {
    return (...args: [string, ...any[]]) => {
      if (!filter || args.some((a) => a?.includes?.(filter))) {
        log(...args)
      }
    }
  }
}
```

[packages/vite/src/node/utils.ts](https://github.com/vitejs/vite/blob/760a953fd4b4d1dd58b2652d5962af50a7510d5c/packages/vite/src/node/utils.ts#L191-L215) · [More projects using obug →](https://dashboard.exa.ai/playground/search?q=obug%20GitHub%20projects)

**Quickstart**

```javascript
import { createDebug } from 'obug';
const debug = createDebug('app');
debug('hello');

```

From [README.md](https://cdn.jsdelivr.net/npm/obug@3.0.0/README.md)

### @opentelemetry/sdk-logs

[GitHub](https://github.com/open-telemetry/opentelemetry-js) · [npm](https://www.npmjs.com/package/@opentelemetry/sdk-logs) · [Docs](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-logs)

Provides the OpenTelemetry SDK for log records.

- Downloads / mo: 322.0M
- Stars: 3.5K
- Last release: 3.1.1
- License: Apache-2.0
- Capabilities: [From the @opentelemetry/sdk-logs docs](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-logs)

```sh
npm install @opentelemetry/api @opentelemetry/sdk-logs
```

**VoltAgent/voltagent** (11.0K stars)

[VoltAgent/voltagent](https://github.com/VoltAgent/voltagent) 

```javascript
async shutdown(): Promise<void> {
    await this.provider.shutdown();
    await this.loggerProvider.shutdown();

    const destroy = (this.storage as any)?.destroy;
    if (typeof destroy === "function") {
      destroy.call(this.storage);
    }
  }
```

[packages/core/src/observability/serverless/volt-agent-observability.ts](https://github.com/VoltAgent/voltagent/blob/e9fc599f6059afcd88b34f2bfc50d0d1d6a0877c/packages/core/src/observability/serverless/volt-agent-observability.ts#L396-L404) · [More projects using @opentelemetry/sdk-logs →](https://dashboard.exa.ai/playground/search?q=%40opentelemetry/sdk-logs%20GitHub%20projects)

**Quickstart**

```javascript
const { SeverityNumber } = require('@opentelemetry/api');
const { LoggerProvider, SimpleLogRecordProcessor, ConsoleLogRecordExporter } = require('@opentelemetry/sdk-logs');
const provider = new LoggerProvider({
  processors: [new SimpleLogRecordProcessor({ exporter: new ConsoleLogRecordExporter() })],
});
const logger = provider.getLogger('example');
logger.emit({ severityNumber: SeverityNumber.INFO, body: 'hello' });

```

From [README.md](https://cdn.jsdelivr.net/npm/@opentelemetry/sdk-logs@3.1.1/README.md)

### pino

[GitHub](https://github.com/pinojs/pino) · [npm](https://www.npmjs.com/package/pino) · [Docs](https://getpino.io)

Writes JSON log lines with configurable levels and contextual child loggers.

- Downloads / mo: 300.7M
- Stars: 18.3K
- Last release: 10.4.0
- License: MIT
- Capabilities: [From the pino docs](https://getpino.io)

**Strengths**

- **Redacts selected object fields.** Configure redaction paths to censor or remove selected values.
- **Binds context through child loggers.** Attach shared fields to every log line from a child logger.

**Watch out for**

- **Redaction paths are case sensitive.** Match each field name’s exact casing in redaction paths.
- **Multistream needs the lowest threshold.** Set the parent level low enough for every destination’s required messages.

```sh
npm install pino
```

**payloadcms/payload** (45.8K stars)

[payloadcms/payload](https://github.com/payloadcms/payload) 

```javascript
export const getLogger = (name = 'payload', logger?: Config['logger']): PayloadLogger => {
  if (!logger) {
    return pino(defaultLoggerOptions)
  }

  // Synchronous logger used by bin scripts
  if (logger === 'sync') {
    return pino(prettySyncLoggerDestination)
  }

  // Check if logger is an object
  if ('options' in logger) {
    const { destination, options } = logger

    if (!options.name) {
      options.name = name
    }

    if (!options.enabled) {
      options.enabled = process.env.DISABLE_LOGGING !== 'true'
    }

    return pino(options, destination)
  } else {
    // Instantiated logger
    return logger
  }
}
```

[packages/payload/src/utilities/logger.ts](https://github.com/payloadcms/payload/blob/7a80820ce48dc71420d92e32ca076dc7d004375e/packages/payload/src/utilities/logger.ts#L26-L53) · [More projects using pino →](https://dashboard.exa.ai/playground/search?q=JavaScript%20projects%20that%20use%20pino&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```javascript
const logger = require('pino')();
logger.info('hello world');

```

From [README.md](https://cdn.jsdelivr.net/npm/pino@10.4.0/README.md)

### consola

[GitHub](https://github.com/unjs/consola) · [npm](https://www.npmjs.com/package/consola) · [Docs](https://github.com/unjs/consola#readme)

Wraps the built-in console.

- Downloads / mo: 260.6M
- Stars: 7.3K
- Last release: 3.4.2
- License: MIT
- Capabilities: [From the consola docs](https://github.com/unjs/consola#readme)

```sh
npm install consola
```

**unjs/unbuild** (2.7K stars)

[unjs/unbuild](https://github.com/unjs/unbuild) 

```javascript
async function _build(
  rootDir: string,
  inputConfig: BuildConfig = {},
  buildConfig: BuildConfig,
  pkg: PackageJson & Partial<Record<"unbuild" | "build", BuildConfig>>,
  cleanedDirs: string[],
  _stubMode: boolean,
  _watchMode: boolean,
): Promise<void> {
  // Resolve preset
  const preset = await resolvePreset(
    buildConfig.preset ||
      pkg.unbuild?.preset ||
      pkg.build?.preset ||
      inputConfig.preset ||
      "auto",
    rootDir,
  );

  // Merge options
  const options = defu(
    buildConfig,
    pkg.unbuild || pkg.build,
    inputConfig,
    preset,
    {
      name: (pkg?.name || "").split("/").pop() || "default",
      rootDir,
      entries: [],
      clean: true,
      declaration: undefined,
      outDir: "dist",
      stub: _stubMode,
      stubOptions: {
        /**
         * See https://github.com/unjs/jiti#%EF%B8%8F-options
         */
        jiti: {
          interopDefault: true,
          alias: {},
        },
      },
      watch: _watchMode,
      watchOptions: _watchMode
        ? {
            exclude: "node_modules/**",
            include: "src/**",
          }
        : undefined,
      externals: [
        ...Module.builtinModules,
        ...Module.builtinModules.map((m) => "node:" + m),
      ],
      dependencies: [],
      devDependencies: [],
      peerDependencies: [],
      alias: {},
      replace: {},
      failOnWarn: true,
      sourcemap: false,
      rollup: {
        emitCJS: false,
        watch: false,
        cjsBridge: false,
        inlineDependencies: false,
        preserveDynamicImports: true,
        output: {
          // https://v8.dev/features/import-attributes
          importAttributesKey: "with",
        },
        // Plugins
        replace: {
          preventAssignment: true,
        },
        alias: {},
        resolve: {
          preferBuiltins: true,
        },
        json: {
          preferConst: true,
        },
        commonjs: {
          ignoreTryCatch: true,
        },
        esbuild: { target: "esnext" },
        dts: {
          compilerOptions: {
            // https://github.com/Swatinem/rollup-plugin-dts/issues/143
            preserveSymlinks: false,
            // https://github.com/Swatinem/rollup-plugin-dts/issues/127
            composite: false,
          },
          respectExternal: true,
        },
      },
      parallel: false,
    } satisfies BuildOptions,
  ) as BuildOptions;

  // Resolve dirs relative to rootDir
  options.outDir = resolve(options.rootDir, options.outDir);

  // Create shared jiti instance for context
  const jiti = createJiti(options.rootDir, { interopDefault: true });

  // Build context
  const ctx: BuildContext = {
    options,
    jiti,
    warnings: new Set(),
    pkg,
    buildEntries: [],
    usedImports: new Set(),
    hooks: createHooks(),
  };

  // Register hooks
  if (preset.hooks) {
    ctx.hooks.addHooks(preset.hooks);
  }
  if (inputConfig.hooks) {
    ctx.hooks.addHooks(inputConfig.hooks);
  }
  if (buildConfig.hooks) {
    ctx.hooks.addHooks(buildConfig.hooks);
  }

  // Allow prepare and extending context
  await ctx.hooks.callHook("build:prepare", ctx);

  // Normalize entries
  options.entries = options.entries.map((entry) =>
    typeof entry === "string" ? { input: entry } : entry,
  );

  for (const entry of options.entries) {
    if (typeof entry.name !== "string") {
      let relativeInput = isAbsolute(entry.input)
        ? relative(rootDir, entry.input)
        : normalize(entry.input);
      if (relativeInput.startsWith("./")) {
        relativeInput = relativeInput.slice(2);
      }
      entry.name = removeExtension(relativeInput.replace(/^src\//, ""));
    }

    if (!entry.input) {
      throw new Error("Missing entry input: " + dumpObject(entry));
    }

    if (!entry.builder) {
      entry.builder = entry.input.endsWith("/") ? "mkdist" : "rollup";
    }

    if (options.declaration !== undefined && entry.declaration === undefined) {
      entry.declaration = options.declaration;
    }

    entry.input = resolve(options.rootDir, entry.input);
    entry.outDir = resolve(options.rootDir, entry.outDir || options.outDir);
  }

  // Infer dependencies from pkg
  options.dependencies = Object.keys(pkg.dependencies || {});
  options.peerDependencies = Object.keys(pkg.peerDependencies || {});
  options.devDependencies = Object.keys(pkg.devDependencies || {});

  // Add all dependencies as externals
  options.externals.push(...inferPkgExternals(pkg));
  options.externals = [...new Set(options.externals)];

  // Call build:before
  await ctx.hooks.callHook("build:before", ctx);

  // Start info
  consola.info(
    colors.cyan(`${options.stub ? "Stubbing" : "Building"} ${options.name}`),
  );
  if (process.env.DEBUG) {
    consola.info(`${colors.bold("Root dir:")} ${options.rootDir}
  ${colors.bold("Entries:")}
  ${options.entries.map((entry) => "  " + dumpObject(entry)).join("\n  ")}
`);
  }

  // Clean dist dirs
  if (options.clean) {
    for (const dir of new Set(
      options.entries
        .map((e) => e.outDir)
        .filter((p): p is NonNullable<typeof p> => !!p)
        .sort(),
    )) {
      if (
        dir === options.rootDir ||
        options.rootDir.startsWith(withTrailingSlash(dir)) ||
        cleanedDirs.some((c) => dir.startsWith(c))
      ) {
        continue;
      }
      cleanedDirs.push(dir);
      consola.info(
        `Cleaning dist directory: \`./${relative(process.cwd(), dir)}\``,
      );
      await rmdir(dir);
      await fsp.mkdir(dir, { recursive: true });
    }
  }

  // Try to selflink
  // if (ctx.stub && ctx.pkg.name) {
  //   const nodemodulesDir = resolve(ctx.rootDir, 'node_modules', ctx.pkg.name)
  //   await symlink(resolve(ctx.rootDir), nodemodulesDir).catch(() => {})
  // }

  const buildTasks = [
    typesBuild, // untyped
    mkdistBuild, // mkdist
    rollupBuild, // rollup
    copyBuild, // copy
  ] as const;

  if (options.parallel) {
    await Promise.all(buildTasks.map((task) => task(ctx)));
  } else {
    for (const task of buildTasks) {
      await task(ctx);
    }
  }

  // Skip rest for stub and watch mode
  if (options.stub || options.watch) {
    await ctx.hooks.callHook("build:done", ctx);
    return;
  }

  // Done info
  consola.success(colors.green("Build succeeded for " + options.name));

  // Find all dist files and add missing entries as chunks
  const outFiles = await glob(["**"], { cwd: options.outDir });
  for (const file of outFiles) {
    let entry = ctx.buildEntries.find((e) => e.path === file);
    if (!entry) {
      entry = {
        path: file,
        chunk: true,
      };
      ctx.buildEntries.push(entry);
    }
    if (!entry.bytes) {
      const stat = await fsp.stat(resolve(options.outDir, file));
      entry.bytes = stat.size;
    }
  }

  const rPath = (p: string): string =>
    relative(process.cwd(), resolve(options.outDir, p));
  for (const entry of ctx.buildEntries.filter((e) => !e.chunk)) {
    let totalBytes = entry.bytes || 0;
    for (const chunk of entry.chunks || []) {
      totalBytes += ctx.buildEntries.find((e) => e.path === chunk)?.bytes || 0;
    }
    let line =
      `  ${colors.bold(rPath(entry.path))} (` +
      [
        totalBytes && `total size: ${colors.cyan(prettyBytes(totalBytes))}`,
        entry.bytes && `chunk size: ${colors.cyan(prettyBytes(entry.bytes))}`,
        entry.exports?.length &&
          `exports: ${colors.gray(entry.exports.join(", "))}`,
      ]
        .filter(Boolean)
        .join(", ") +
      ")";
    if (entry.chunks?.length) {
      line +=
        "\n" +
        entry.chunks
          .map((p) => {
            const chunk =
              ctx.buildEntries.find((e) => e.path === p) || ({} as any);
            return colors.gray(
              "  └─ " +
                rPath(p) +
                colors.bold(
                  chunk.bytes ? ` (${prettyBytes(chunk?.bytes)})` : "",
                ),
            );
          })
          .join("\n");
    }
    if (entry.modules?.length) {
      line +=
        "\n" +
        entry.modules
          .filter((m) => m.id.includes("node_modules"))
          .sort((a, b) => (b.bytes || 0) - (a.bytes || 0))
          .map((m) => {
            return colors.gray(
              "  📦 " +
                rPath(m.id) +
                colors.bold(m.bytes ? ` (${prettyBytes(m.bytes)})` : ""),
            );
          })
          .join("\n");
    }
    consola.log(entry.chunk ? colors.gray(line) : line);
  }
  console.log(
    "Σ Total dist size (byte size):",
    colors.cyan(
      prettyBytes(ctx.buildEntries.reduce((a, e) => a + (e.bytes || 0), 0)),
    ),
  );

  // Validate
  validateDependencies(ctx);
  validatePackage(pkg, rootDir, ctx);

  // Call build:done
  await ctx.hooks.callHook("build:done", ctx);

  consola.log("");

  if (ctx.warnings.size > 0) {
    consola.warn(
      "Build is done with some warnings:\n\n" +
        [...ctx.warnings].map((msg) => "- " + msg).join("\n"),
    );
    if (ctx.options.failOnWarn) {
      consola.error(
        "Exiting with code (1). You can change this behavior by setting `failOnWarn: false` .",
      );
      // eslint-disable-next-line unicorn/no-process-exit
      process.exit(1);
    }
  }
}
```

[src/build.ts](https://github.com/unjs/unbuild/blob/cf1c30333df2d6b19e6208f67157024975bdba82/src/build.ts#L78-L415) · [More projects using consola →](https://dashboard.exa.ai/playground/search?q=consola%20GitHub%20projects)

**Quickstart**

```javascript
import { consola } from 'consola';
consola.info('hello');

```

From [README.md](https://cdn.jsdelivr.net/npm/consola@3.4.2/README.md)

### Sentry Node SDK

[GitHub](https://github.com/getsentry/sentry-javascript) · [npm](https://www.npmjs.com/package/@sentry/node) · [Docs](https://github.com/getsentry/sentry-javascript/tree/master/packages/node)

Provides the Sentry SDK for Node.js, with OpenTelemetry for performance instrumentation.

- Downloads / mo: 217.2M
- Stars: 8.8K
- Last release: 11.14.0
- License: MIT
- Capabilities: [From the Sentry Node SDK docs](https://github.com/getsentry/sentry-javascript/tree/master/packages/node)

```sh
npm install @sentry/node
```

**Quickstart**

```javascript
import * as Sentry from '@sentry/node';
Sentry.init({ dsn: process.env.SENTRY_DSN });
Sentry.logger.info('hello');

```

From [Core API](https://docs.sentry.io/platforms/javascript/migration/v10-to-v11/) · [Find projects using Sentry Node SDK →](https://dashboard.exa.ai/playground/search?q=%40sentry/node%20GitHub%20projects)

### winston

[GitHub](https://github.com/winstonjs/winston) · [npm](https://www.npmjs.com/package/winston) · [Docs](https://github.com/winstonjs/winston#readme)

Routes log events through configurable formats and transports.

- Downloads / mo: 141.2M
- Stars: 24.5K
- Last release: 3.19.0
- License: MIT
- Capabilities: [From the winston docs](https://github.com/winstonjs/winston#readme)

**Strengths**

- **Combines multiple transports.** Send one logger’s events to multiple destinations with separate thresholds.
- **Defines application-specific severity levels.** Configure custom logging levels when creating a logger.

**Watch out for**

- **Default logger needs configured transports.** Add transports before using the default logger to avoid buffered log buildup.

```sh
npm install winston
```

**Quickstart**

```javascript
const winston = require('winston');
const logger = winston.createLogger({
  format: winston.format.json(),
  transports: [new winston.transports.Console()],
});
logger.info('hello');

```

From [README.md](https://cdn.jsdelivr.net/npm/winston@3.19.0/README.md) · [Find projects using winston →](https://dashboard.exa.ai/playground/search?q=JavaScript%20projects%20that%20use%20winston&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

### loglevel

[GitHub](https://github.com/pimterry/loglevel) · [npm](https://www.npmjs.com/package/loglevel)

Adds log level methods to the available console.log methods.

- Downloads / mo: 126.9M
- Stars: 2.7K
- Last release: 1.9.2
- License: MIT
- Capabilities: [From the loglevel docs](https://github.com/pimterry/loglevel)

```sh
npm install loglevel
```

**matrix-org/matrix-js-sdk** (2.2K stars)

[matrix-org/matrix-js-sdk](https://github.com/matrix-org/matrix-js-sdk) 

```javascript
function getPrefixedLogger(prefix?: string): PrefixedLogger {
    const loggerName = DEFAULT_NAMESPACE + (prefix === undefined ? "" : `-${prefix}`);
    const prefixLogger = loglevel.getLogger(loggerName) as PrefixedLogger;

    if (prefixLogger.getChild === undefined) {
        // This is a new loglevel Logger which has not been turned into a PrefixedLogger yet.
        prefixLogger.prefix = prefix;
        prefixLogger.getChild = (childPrefix): Logger => {
            // create the new child logger
            const childLogger = getPrefixedLogger((prefix ?? "") + childPrefix);
            // Assign the methodFactory from the parent logger.
            // This is useful if we add extensions to the parent logger that modifies
            // its methodFactory. (An example extension is: storing each log to a rageshake db)
            childLogger.methodFactory = prefixLogger.methodFactory;
            // Rebuild the child logger with the new methodFactory.
            childLogger.rebuild();
            return childLogger;
        };
        prefixLogger.setLevel(loglevel.levels.DEBUG, false);
    }

    return prefixLogger;
}
```

[src/logger.ts](https://github.com/matrix-org/matrix-js-sdk/blob/f6afaad029ebc4f2c15c269d7e2167d67454dbbc/src/logger.ts#L134-L156) · [More projects using loglevel →](https://dashboard.exa.ai/playground/search?q=loglevel%20GitHub%20projects)

**Quickstart**

```javascript
const log = require('loglevel');
log.setLevel('info');
log.info('hello');

```

From [README.md](https://cdn.jsdelivr.net/npm/loglevel@1.9.2/README.md)

## FAQ

### Which JavaScript logging library should I use?

[Pino](#pino) suits Node.js services that write structured JSON logs. [Winston](#winston) suits apps that route logs to several destinations with separate formats. [debug](#debug) suits libraries that print diagnostics only when a namespace is enabled.

### Pino vs Winston: which should I use?

[Pino](#pino) writes JSON log lines with child loggers that add context to each record. [Winston](#winston) routes each log event through configurable formats and multiple transports.

### What is Consola?

[Consola](#consola) is a console wrapper for human-facing CLI logs. Custom reporters change how it prints or serializes each log object.

### What is loglevel?

[loglevel](#loglevel) adds log level methods to any available console.log method. It supports named loggers with severity filtering.

### How do I send Node.js logs to Sentry?

The [Sentry Node SDK](#sentry-node) captures log records through its logger methods or its logging integrations.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "JavaScript Node logging libraries Pino Winston Bunyan Log4js JSON child loggers transports redaction code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
