npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

firebase-logging

v1.0.16

Published

Real-time logging for Firebase

Downloads

16

Readme

alt Firebase Logging Logo

Easier Logging for Firebase

Firebase Logging is a free open source tool that we built for the Firebase community. We are regular users of Firebase and this solves a real "logging" need for us. We hope it helps you too.

See our Firebase Logging Page for more information.

Why Firebase Logging

Firebase's CLI (command line interface) logging requires you to re-run the tool just to see new data. That becomes a lot of up 'arrow key' and 'enter' pressing.

Firebase Logging gives you mostly real-time logging by continually running the Firebase CLI logging command and printing to the console new entires. You can output the logs to the console and a file.

Log enhancements include:

  • Colored Logs: timestamp blue, function name green, warning yellow, and error red. Default.
  • Locally Formatted Timestamp: format from UTC timestamp to your local time. Use --ft parameter to format.

Things to Note

The default polling occurs every 2 seconds. You can set the frequency of polling with the -freq parameter from a minimum of 1500 milliseconds, which is the most Firebase will allow, to an infinite maximum. You might want to increase the frequency if you find the polling is taking too much system resources.

The default pull is 250 lines, so if you have more than 250 lines logs per the polling frequency, some logs will be missed. Increase the number of log lines pulled with the --n parameter to capture more logs (1-1000).

Installation

npm i -g firebase-logging

Requirements

  • firebase-tools globally installed.
  • A Firebase project id you want to see the logs of

Usage

Run

firebase-logging --project=[Firebase projectId]

Example

Start the logging to the console for project myFirerun, only for the sendReport function, save to the savelog.txt file, and format the time to local.

firebase-logging --project=myFirerun --func=sendReport --file=savelog.txt --ft

Parameters

Required

| Parameter | Description | | ------------- |:-------------------------------------------------:| | --project | [projectId] of Firebase project |

Optional

| Parameter | Description | | ------------- |:-------------------------------------------------:| | --h | Help info | | --file | [File Name] to write the logs | | --colorOff | Turn off coloring of logs | | --func | [Function Name] of specific function to view logs | | --n | [Number] of log lines to pull (1-1000) | | --ft | Format timestamp to local date and time | | --freq | [Milliseconds] to poll for new logs |