Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@firebase/logger

Package Overview
Dependencies
Maintainers
4
Versions
3062
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@firebase/logger

A logger package for use in the Firebase JS SDK

  • 0.4.1-vertexai-preview.1aadc47ed
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4M
decreased by-31.79%
Maintainers
4
Weekly downloads
 
Created

What is @firebase/logger?

The @firebase/logger npm package is a utility library for logging purposes within Firebase applications. It provides a flexible, extensible logging solution that can be easily integrated into any Firebase project. The package allows developers to log messages at different levels (e.g., debug, info, warn, error) and to configure the logging behavior to suit their needs.

What are @firebase/logger's main functionalities?

Configurable log levels

This feature allows developers to set the log level, controlling which types of log messages are actually printed to the console or other outputs. In the code sample, the log level is set to 'debug', which means all levels of logs will be shown.

const { Logger } = require('@firebase/logger');

const logger = new Logger();
logger.logLevel = 'debug';
logger.debug('This is a debug message.');

Custom log handlers

Developers can add custom handlers to process the log messages. In the example, a custom handler is added to specifically handle error messages differently by logging them to the console's error stream.

const { Logger } = require('@firebase/logger');

const logger = new Logger();
logger.addHandler((logLevel, ...args) => {
  if (logLevel === 'error') {
    console.error(...args);
  }
});
logger.error('This is an error message.');

Other packages similar to @firebase/logger

FAQs

Package last updated on 22 Apr 2024

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc