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

plink-functions

v1.0.123

Published

Realm offers extremely minimal logging facilities, and so we have our own cloud logging system (Graylog 2) to allow us to keep more extensive, powerful logs. Ask Andrew how to access Graylog if you need to look at these logs.

Downloads

32

Readme

Plink Functions

Logging

Realm offers extremely minimal logging facilities, and so we have our own cloud logging system (Graylog 2) to allow us to keep more extensive, powerful logs. Ask Andrew how to access Graylog if you need to look at these logs.

pipeToRemote

This function from util is how logs messages are sent back to a remote host. If you have a need, you can redirect the logs to somewhere other than Graylog easily by changing the function passed to pipeToRemote.

Log Levels

emergency - 1
"HOLY SHIT IT'S ON FIRE!"

Something bad enough that, if an automated system to do this existed, an engineer should immediately be paged to come handle the error.

An emergency should be a big enough deal that it could result in a major breach, corrupted collections, system-wide failures, massive performance degradation racking up $10,000's+ in Realm/Atlas bills, etc.

An example would be detecting a bad value which indicates a programmer error which will disable the whole application, such as a bug that prevents anyone from logging in.

alert - 2
"First thing in the morning!"

An error which, if ignored until the morning, wouldn't be ruinous but could still cause serious consequences like lost business, a sullied image, a small breach, or very limited corruption of user data.

An example would be if users from a rather small locale (>1%) had a locale-specific bug which prevented them from using the application without corrupting anything.

error - 3
"Sometime before Friday..."

Usually if the input being processed by a function was invalid, and the whole request must be abandoned. Can also indicate what's very likely to be a programmer error.

An example would be the frontend generating requests which, in some edge cases, cannot be processed, or a permission which references a type of resource that doesn't exist.

Another good usage of an error would be detecting that a document is corrupted, such as if a required parent was not specified.

warning - 4
"I mean, we should fix it soon, but..."

Appropriate if this is the kind of thing you would want to stick out in the logs, such as a missing configuration value for which a (potentially suboptimal) default exists or if it's going to degrade performance or cause the user problems, a warning is fitting.

notice - 5
Just making the logs a little more useful

Something that isn't indicative of any programmer error but also isn't the "happy path".

An example would be that when a requester is not authorized to make a request.

This is the lowest logging level that is normally recorded.

info - 6 and debug - 7
Primarily for debugging and profiling

Information about what the function is doing that isn't "spammy".

The difference between info and debug is pretty subjective, so here's an example for permissions:

  • Recording the resources derived from a document change in derivePermissions is an info statement.
  • Logging the result of a single atomic permission comparison is a debug statement (because, for example, updating a Point might involve dozens of these).

info and debug logs will typically dump whole documents and large amounts of data, and so the default logging level is set to 5,