
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
@forgerock/sdk-logger
Advanced tools
A flexible and configurable logging utility for the Ping Identity JavaScript SDK.
A flexible and configurable logging utility for the Ping Identity JavaScript SDK.
error
, warn
, info
, debug
, none
)npm install @ping-identity/effects-logger
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');
The logger supports the following log levels (in order of severity):
error
- Critical errors that may cause the application to failwarn
- Warnings that don't interrupt application flow but require attentioninfo
- General information about application flowdebug
- Detailed information for debugging purposesnone
- No logs will be outputWhen a log level is set, only messages of that level or higher severity will be displayed.
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 messagewarn(...args)
: Log a warning messageinfo(...args)
: Log an informational messagedebug(...args)
: Log a debug messagechangeLevel(level)
: Change the current log levelRun nx build logger
to build the library.
Run nx test @forgerock/sdk-logger
to execute the unit tests via Vitest.
FAQs
A flexible and configurable logging utility for the Ping Identity JavaScript SDK.
The npm package @forgerock/sdk-logger receives a total of 98 weekly downloads. As such, @forgerock/sdk-logger popularity was classified as not popular.
We found that @forgerock/sdk-logger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.