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 🙏

© 2026 – Pkg Stats / Ryan Hefner

squill-logger

v1.0.3

Published

Custom logger send to SQS in TPP

Readme

SQuill – Serverless Logging via SQS

SQuill is a lightweight logging helper for AWS Lambda environments that sends structured logs to an SQS queue for centralized collection and processing. Built for plug-and-play use via Lambda Layers.


Installation

npm install squill-logger

Features

  • Log any entity-related event with a simple function call
  • Sends structured JSON messages to an SQS queue
  • Automatically supports metadata and source tagging
  • Can be imported via Lambda Layer or directly in your app

Usage

import { sendLogToSqs } from 'squill';

await sendLogToSqs({
  entityType: 'ORDER',
  entityId: 'abc-123',
  type: 'ORDER_CREATED',
  message: 'Order created successfully',
  metadata: { amount: 500, currency: 'EUR' },
  source: 'order-service',        // optional
  entityGroup: 'establishment-1'  // optional
});

Environment Variables

Ensure the following environment variables are defined in your Lambda function's configuration (not the layer itself):

| Variable | Description | |----------|-------------| | REGION | The AWS region your Lambda is running in | | LOGGER_QUEUE_URL | The full SQS queue URL where logs should be sent |

These must be defined at the Lambda function level, not in the layer. Lambda Layers do not have their own environment — they inherit from the function that includes them.


Installation (via Lambda Layer)

  1. Upload your squill code as a Lambda Layer (e.g., /opt/nodejs/squill.js).
  2. In your Lambda function:
    • Add the Layer ARN under "Layers"
    • Add REGION and LOGGER_QUEUE_URL to your Lambda environment variables
  3. Import and use:
    import { sendLogToSqs } from 'squill';

License

MIT – free to use and modify.


⚠️ About Environment Variables in Lambda Layers

Yes, as long as you set REGION and LOGGER_QUEUE_URL in the Lambda function, your sendLogToSqs function will access them just fine.

Lambda Layers do not isolate environment variables — they're just code libraries mounted under /opt. Any code inside them will share the same runtime environment as the Lambda that invokes it.