Comparing version 2.0.1 to 2.1.0
@@ -164,5 +164,2 @@ var set = require('subset') | ||
// Prevent leaky prototype hacks via l.constructor.prototype | ||
Object.freeze(Logger.prototype); | ||
// entry point | ||
@@ -169,0 +166,0 @@ exports.init = function (parent, moduleName) { |
@@ -5,3 +5,3 @@ { | ||
"description": "A multi-transport, peer-dependent logging library", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"stability": "stable", | ||
@@ -24,3 +24,3 @@ "repository": { | ||
"test": "./test.sh verbose", | ||
"instrument": "jscoverage lib", | ||
"precoverage": "jscoverage lib", | ||
"coverage": "LOGULE_COV=1 ./test.sh lcov", | ||
@@ -27,0 +27,0 @@ "coveralls": "npm run coverage | coveralls" |
@@ -8,3 +8,3 @@ # Logule | ||
Logule is a pretty, but heavily configurable logging utility for nodejs. It allows multiple transports (stdout + JSON filestream + emitted logs) as well as being configurable per user, per app and per module via localized config files. | ||
Logule is a pretty, but heavily configurable logging utility for nodejs. It allows multiple transports as well as being configurable per user, per app and per module via localized config files. | ||
@@ -31,3 +31,3 @@  | ||
Finally, you should be able to get trace/debug messages from a module that's not behaving correctly, without spamming the shit out of people not using logule! | ||
Finally, you should be able to get trace/debug messages from a module that's not behaving correctly, without spamming people not using logule! | ||
@@ -215,3 +215,3 @@ Logule strives to adhere these goals and beyond that has since 1.0 maintained a stable API. Features so far has been greatly improved via issues/pull requests contributions, so please follow this path if there is anything you feel deserves attention. | ||
## Configuration | ||
Configuration of colors, style, date formatting, transports, setting mutability and global suppression levels are done via via config files. The [default configuration file](https://github.com/clux/logule/blob/master/.logule.json) results in output looking like the images herein. | ||
Configuration of colors, style, date formatting, transports, setting mutability and global suppression levels are done via config files. The [default configuration file](https://github.com/clux/logule/blob/master/.logule.json) results in output looking like the images herein. | ||
@@ -434,6 +434,8 @@ Configs are located via the [confortable](https://github.com/clux/confortable) module. This module performs priority based config searches. In particular, it is used here with the following path priorities: | ||
## Colors | ||
The ASNI color code wrapping and zalgolizer is provided by [dye](https://github.com/clux/dye), wheras it used to rely on `colors`. Dye does not introduce implicit global dependencies on `String.prototype`, and provides more sensible zalgolizations. | ||
The ASNI color code wrapping and zalgolizer is provided by [dye](https://github.com/clux/dye), which does not introduce implicit global dependencies on `String.prototype`. | ||
## npm Usage | ||
When logging with `logule >=2` inside an npm published library/executable, the practice is to put `logule` inside `package.json` `peerDependencies` and NOT the normal `dependencies`. This ensures all modules use the same code and thus logule can encapsulate everything needed to process ALL the logs an application uses. Logule's API is stable, so simply restricting to `"logule": "~2"` will suffice. | ||
Logging is a | ||
Published libraries that log should not depend on a logging library directly | ||
When logging with `logule >=2`, the practice is to put `logule` inside `package.json` `peerDependencies` and NOT the normal `dependencies`. This ensures all modules use the same code and thus logule can encapsulate everything needed to process ALL the logs an application uses. Logule's API is stable, so simply restricting to `"logule": "~2"` will suffice. | ||
@@ -440,0 +442,0 @@ In `"logule": "~1"`, bundling of separate copies per npm module was the standard and so logule then adopted the method of communicating with other copies via `process.logule` to compensate for not having any one central piece of code where all logs went through. Ultimately, decisions were being made on behalf of the config so this worked well. |
Sorry, the diff of this file is not supported yet
461
102530
678