pro
prolog
npm i prolog
pro

prolog

An event- and stream-aware logger for pros. Meaning, professionals.

by Ben Alman

0.1.0 (see all)TypeScript:Not Found
npm i prolog
Readme

prolog Build Status

An event- and stream-aware logger for pros. Meaning, professionals.

Getting Started

Install the module with: npm install prolog

// Create a logger. Simple.
var ProLog = require('prolog').ProLog;
var log = new ProLog();
log.log('This goes to stdout.');
log.error('This goes to stderr.');
log.group();
log.info('This is indented...');
log.groupEnd();
log.warn('But this is not!');

// This logger forwards all its messages to the parent "log" logger, but
// adds an additional child-only "childonly" level and *removes* the "error"
// level. Also, group indentation is cumulative.
var childlog = new ProLog(log, {
  levels: {
    error: null,
    childonly: '[child] %s%s',
  },
});
childlog.log('This goes to the parent, then to stdout.');
childlog.childonly('This goes to the parent, then to stdout.');
childlog.error('This throws an exception, whoops!');

Documentation

Total work-in-progress. Haven't added the stream or progress stuff yet.

See the examples directory for code-as-documentation.

Examples

(Coming soon)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)

License

Copyright (c) 2013 "Cowboy" Ben Alman
Licensed under the MIT license.

Downloads/wk

5

GitHub Stars

34

LAST COMMIT

9yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

2

OPEN PRs

1
VersionTagPublished
0.1.0
latest
9yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate