You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@forgerock/sdk-logger

Package Overview
Dependencies
Maintainers
5
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forgerock/sdk-logger

A flexible and configurable logging utility for the Ping Identity JavaScript SDK.

1.2.0
latest
Source
npmnpm
Version published
Weekly downloads
99
125%
Maintainers
5
Weekly downloads
 
Created
Source

Logger

A flexible and configurable logging utility for the Ping Identity JavaScript SDK.

Features

  • Multiple log levels (error, warn, info, debug, none)
  • Ability to change log level at runtime
  • Support for multiple arguments in log messages
  • TypeScript support with proper type definitions

Installation

npm install @ping-identity/effects-logger

Usage

import { logger } from '@ping-identity/effects-logger';

// Initialize the logger with a specific log level
const log = logger({ level: 'info' });

// Basic usage
log.info('Application started');
log.error('An error occurred:', new Error('Something went wrong'));

// Multiple arguments
log.debug('User data:', { id: '123', name: 'John Doe' });

// Change log level at runtime
log.changeLevel('debug'); // Enable debug logs
log.debug('Debug information is now visible');

log.changeLevel('none'); // Disable all logs
log.error('This error will not be logged');

Log Levels

The logger supports the following log levels (in order of severity):

  • error - Critical errors that may cause the application to fail
  • warn - Warnings that don't interrupt application flow but require attention
  • info - General information about application flow
  • debug - Detailed information for debugging purposes
  • none - No logs will be output

When a log level is set, only messages of that level or higher severity will be displayed.

API Reference

logger({ level })

Initializes a new logger instance.

Parameters:

  • level: The initial log level ('error', 'warn', 'info', 'debug', or 'none')

Returns: A logger instance with the following methods:

  • error(...args): Log an error message
  • warn(...args): Log a warning message
  • info(...args): Log an informational message
  • debug(...args): Log a debug message
  • changeLevel(level): Change the current log level

Building

Run nx build logger to build the library.

Running unit tests

Run nx test @forgerock/sdk-logger to execute the unit tests via Vitest.

FAQs

Package last updated on 26 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.