Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cowboy/node-prolog
An event- and stream-aware logger for pros. Meaning, professionals.
https://github.com/cowboy/node-prolog
Last synced: 17 days ago
JSON representation
An event- and stream-aware logger for pros. Meaning, professionals.
- Host: GitHub
- URL: https://github.com/cowboy/node-prolog
- Owner: cowboy
- License: mit
- Created: 2013-08-09T14:51:05.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-23T16:05:45.000Z (about 11 years ago)
- Last Synced: 2024-10-14T14:17:55.893Z (about 1 month ago)
- Language: JavaScript
- Size: 250 KB
- Stars: 34
- Watchers: 4
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# prolog [![Build Status](https://secure.travis-ci.org/cowboy/node-prolog.png?branch=master)](http://travis-ci.org/cowboy/node-prolog)
An event- and stream-aware logger for pros. Meaning, professionals.
## Getting Started
Install the module with: `npm install prolog````javascript
// 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](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](http://gruntjs.com/).## Release History
_(Nothing yet)_## License
Copyright (c) 2013 "Cowboy" Ben Alman
Licensed under the MIT license.