New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details → →
Socket
Book a DemoSign in
Socket

pikmin

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pikmin

A lightweight Node.js logger 🎊

latest
Source
npmnpm
Version
0.1.13
Version published
Maintainers
1
Created
Source

Pikmin - A lightweight, customizable Node.JS logger

MIT License Travis Build Status NPM downloads

Pikmin is a fast and highly customizable logger for Node.JS with various custom transports

GitHub | NPM


Installing

$ yarn add pikmin # Install w/ Yarn
$ npm i pikmin # Install w/ NPM

Example

// main.js
const Pikmin = require('pikmin');
const pikmin = new Pikmin.instance({
  name: 'main',
  autogen: true,
  format: `${Pikmin.colors.cyan('[%h:%m:%s]')} %l ${Pikmin.colors.green('->')} `,
  transports: [
    new Pikmin.FileTransport({ file: 'tmp/log.txt' }),
    new Pikmin.ConsoleTransport({ process: process, name: 'info' })
  ]
});

pikmin.addTransport(new Pikmin.ConsoleTransport({ process: process, name: 'error', format: `${Pikmin.colors.red('%l')}`, defaults: {} }));
Pikmin.bind(pikmin, console);

pikmin.info(Symbol.iterator);
pikmin.info({ 'test': 123 });
pikmin.error('This is an error!');

require('./global.js')();
Pikmin.unbind(pikmin);

// global.js
const { loggers, colors } = require('../');
const log = loggers.get('main');

module.exports = () => {
  log.info(`Method "${colors.green('info')}" is global`);
  console.pikmin.error('Oh no!');
};

Showcase

showcase

Documentation

Documentation can be found at https://github.com/PassTheWessel/pikmin/wiki

Keywords

log

FAQs

Package last updated on 18 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts