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

log4js-stackdriver-appender

v2.0.0

Published

a log4js appender to use with google cloude logging stackdriver api

Readme

log4js-stackdriver-appender

a log4js appender for use with the stackdriver on google cloud.

to allow access to google cloud logging please follow setup and access permission on google cloud documentation. You can use Application Default Credentials (ADC) or supply credential in config.

if your code is running on Google Cloud then make sure the proper scopes is setup.

if you running on you local dev server , use gcloud cli to authorize.

By default all logging will be done to file syslog in the "Global" logging section.

If you want you can specify a resource which the log will be written to.

quick usage

var config ={
    appenders: {
        google: {
            type:  'log4js-stackdriver-appender',
            resource: {
                type: "container",
                labels: {
                    cluster_name: 'local-dev',
                    pod_id: process.env["HOSTNAME"],
                    container_name: ''
                }
            },
            logFileName: 'syslog',
            layout: {
                type: 'basic'
            }
        }
    },
    categories: {
        default: {
            appenders: ['google'],
            level:'DEBUG'
        }
    }
};

var log4js = require('log4js');
log4js.configure(config);
var logger = log4js.getLogger('local');
logger.debug('somthing');

if you are running from local/not on GCP you can supply credentials in the config for connecting to your GCP

var config ={
    appenders:{
        google:{
            type: 'log4js-stackdriver-appender',
            credentials:{
                projectId: 'your-project-id',
                keyFilename: '/path/to/key.json'
            }
        }
    }
}

install

npm install log4js-stackdriver-appender --save