Skip to content

salemove/node-lenjador

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lenjador

Installation

  npm install --save lenjador

Preprocessors

Preprocessors allow modification of log messages, prior to sending of the message to the configured logger(s).

Whitelist

Masks all the fields except those whitelisted in the configuration using JSON Pointer. Only simple values(string, number, boolean) can be whitelisted. Whitelisting array and hash elements can be done using wildcard symbol ~.

Configuration

preprocessors:
  whitelist:
    pointers: ['/info/phone', '/addresses/~/host']

Usage

logger = Lenjador.build(application_name, logger_config, preprocessors)

input = {password: 'password', info: {phone: '+12055555555'}, addresses: [{host: 'example.com', path: 'info'}]}

logger.debug("Received request", input)

Logger output:

Received request {"password": "********", "info":{"phone":"+12055555555"}, "addresses": [{"host": "example.com","path": "****"}]}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published