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

loggerize

v0.1.8

Published

A Universal Logger for Application and HTTP/Middleware

Downloads

9

Readme

Loggerize

ONE LOGGER TO RULE THEM ALL ...

Motivation

The aim of Loggerize (also known as LoggerizeJS) was to create a universal JavaScript Logging Library simple enough for users who only began programming yesterday, yet comprehensive enough to satisfy even the most demanding and experienced coders.

Features

  • Log both Application and HTTP/Express Middleware events in one unified interface
  • No third party dependencies to cause untraceable bugs
  • Hundreds of unit/integration test for stability
  • Extensive documentation with dozens of bespoke exmples
  • Simple to memorize configurations defined as plain text strings instead of complicated multilevel class methods
  • Easily extends functionally with nothing more than anonymous functions or JavaScript objects
  • Advance state aware filters
  • Custom log levels and level colors
  • Text string and JSON log output formats
  • Heirarchial logger names and ancestor traversal

Documentation

Full tutorials can be found on the Loggerize WIKI coupled with comprehensive documentation in the repository's docs directory.

Installation

npm i loggerize

Quick Start

For those not interesting in reading the documentation/tutorials, see below for the simplest way to immediately get up and running with the most basic logger.

var Loggerize = require("loggerize");

//Create Basic Logger
let logger = Loggerize.createLogger("myLogger");

// Outputs => 'debug Successfully Logged'
logger.debug("Successfully Logged");

Likewise, see below for how to quickly start logging Connect/Express Middleware. Log message will output according to the Apache common log format.

var app = require('express')();
var loggerize = require("loggerize");

// Call middleware logger directly from the library
app.use(loggerize.mw());

app.get('/', function(req, res){
	res.send('Hello World!')
});

//Start listening on port 3000
app.listen(3000, function(){
	console.log("App listening on port 3000!")
});

Testing & Linting

To run the unit tester and the linter, navigate to the loggerize sub-directory of the node_modules directory (cd /path/to/node_modules/loggerize) and run the commands below:

Testing with mocha: npm test

Linting with eslint: npm run lint

Versioning

Loggerize uses SemVer for versioning. For the versions available, see the tags on this repository.

Issues

Please report all issues and bugs to https://github.com/ghosthack13/loggerize/issues

Contributing

As of now the best way to contribute is by donating (see below). Donations do not need to be financial. It can be donating server space to test different operating systems, a subscription to loggly to create new log destinations or even a logo design if you are competent in photo editing.

Loggerize will start allowing pull request when the design specification for version 1 is finalized, as there are still internal speed optimizations to implement and I will not want anyone to take their time only to have their code refactored or removed later.

Authors

Loggerize was created and maintained by ghosthack13.

Donations

If you belive Loggerize has helped you as a developer and/or your organization and would like to see continued upgrades and more features added, please consider making a kind donation via our Patreon.

Licence

This project is dual licensed under the GNU AGPLv3 and the Loggerize EULA.