
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@firebase/logger
Advanced tools
This package serves as the base of all logging in the JS SDK. Any logging that is intended to be visible to Firebase end developers should go through this module.
Firebase components should import the Logger
class and instantiate a new
instance by passing a component name (e.g. @firebase/<COMPONENT>
) to the
constructor.
e.g.
import { Logger } from '@firebase/logger';
const logClient = new Logger(`@firebase/<COMPONENT>`);
Each Logger
instance supports 5 log functions each to be used in a specific
instance:
debug
: Internal logs; use this to allow developers to send us their debug
logs for us to be able to diagnose an issue.log
: Use to inform your user about things they may need to know.info
: Use if you have to inform the user about something that they need to
take a concrete action on. Once they take that action, the log should go away.warn
: Use when a product feature may stop functioning correctly; unexpected
scenario.error
: Only use when user App would stop functioning correctly - super rare!Each log will be formatted in the following manner:
`[${new Date()}] ${COMPONENT_NAME}: ${...args}`
Winston is a popular logging library for Node.js. Similar to @firebase/logger, it supports multiple transport options for logging (e.g., console, file, HTTP). Winston provides more built-in transports and is more configurable than @firebase/logger, making it suitable for more complex logging needs.
Bunyan is another Node.js logging library that focuses on JSON logging. Like @firebase/logger, it allows for different log levels and custom streams. However, Bunyan's output is more structured and is designed to be more easily parsed by systems than the more straightforward text logging of @firebase/logger.
FAQs
A logger package for use in the Firebase JS SDK
The npm package @firebase/logger receives a total of 5,141,123 weekly downloads. As such, @firebase/logger popularity was classified as popular.
We found that @firebase/logger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.