Skip to content
A lightweight Node.js logger 🎊
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
.vscode Initial release! Apr 22, 2019
__test__ Add rgb and hex transformer Jun 26, 2019
assets Initial release! Apr 22, 2019
lib Still gotta fix typings, temporary fix Aug 16, 2019
.eslintrc Initial release! Apr 22, 2019
.gitignore Initial release! Apr 22, 2019
.travis.yml oopsie Apr 22, 2019
CODE_OF_CONDUCT.md Initial release! Apr 22, 2019
LICENSE Initial commit Apr 22, 2019
README.md Showcase Apr 22, 2019
index.d.ts Still gotta fix typings, temporary fix Aug 16, 2019
package.json v0.1.12 Aug 16, 2019
yarn.lock Initial release! Apr 22, 2019

README.md

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

You can’t perform that action at this time.