loggerize

0.1.8 • Public • Published

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.

Package Sidebar

Install

npm i loggerize

Weekly Downloads

0

Version

0.1.8

License

AGPL-3.0 or See EULA.md

Unpacked Size

527 kB

Total Files

115

Last publish

Collaborators

  • ghosthack13