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

@nesn/commons-lambda-logger

v1.0.20

Published

A compact logger that works in both commonJS and ES module projects.

Downloads

152

Readme

NESN LAMBDA LOGGER

A compact logger that works in both commonJS and ES module projects.

Usage

// CommonJS
const { lambdaLogger } = require('@nesn/lambda-logger');

// ES Modules
import { lambdaLogger } from '@nesn/lambda-logger';

lambdaLogger.info|error|warn(message:string, meta:Record<string, any>, ...tags | null);

Example

// CommonJS
const { lambdaLogger } = require('@nesn/lambda-logger');

// ES Modules
import { lambdaLogger} from '@nesn/lambda-logger';

lambdaLogger.info | error | warn('Your log message here', {
    metadata: 'goes here',
    nested: {
        objects: {
            description: 'are okay as well'
        },
        example: {
            user: {
                email: '[email protected]',
                name: 'Some Juan'
            }
        }
    } // Use any number of LogTags
}, 'tag_1', 'tag_two', 'tag_3');
Field	Value
@ingestionTime	1690917057370
@log	837502413404:/aws/lambda/<your-lambda-and-log-group>
@logStream	2023/08/01/[$LATEST]11221d14ce6c4c5ea715d4255fec83e0
@message	2023-08-01T19:10:52.522Z	2d82aa0d-915e-4d27-b21c-efc055cdef03	INFO	THIS IS A MESSAGE FROM STANDARD WINSTON LOGGER {"email":"[email protected]","nested":{"foo":{"id":"0u812"}},"tags":"get_user_tag,entitlement_tag,ip_lookup_tag"}
@requestId	2d82aa0d-915e-4d27-b21c-efc055cdef03
@timestamp	1690917052522
nested.objects.description are okay as well
nested.example.user.email	[email protected]
nested.example.user.name	Some Juan
tags	tag_1,tag_two,