Comparing version 0.1.0 to 0.1.1
{ | ||
"name" : "dev-logger" | ||
, "version" : "0.1.0" | ||
, "description" : "a simple logger utility for nodejs with debug level support, color output and message timestamp" | ||
, "homepage" : "https://github.com/SGF-Games/node-simple-logger" | ||
, "keywords" : ["logger", "log", "utility"] | ||
, "author" : "SGF-Games" | ||
, "main" : "./lib/logger" | ||
, "dependencies" : { | ||
"name": "dev-logger", | ||
"description": " A logger utility can be easily swiched between dev development and production mode. This tool supports: * built-in log rotation; * colorized log message; * 4 log levels and custom log level output; * caching log messages ", | ||
"version": "0.1.1", | ||
"homepage": "https://github.com/yi/node-dev-logger", | ||
"author": { | ||
"name": "yi", | ||
"email": "yi2004@gmail.com", | ||
"url": "https://github.com/yi" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/yi/node-dev-logger.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/yi/node-dev-logger/issues" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/yi/node-dev-logger/blob/master/LICENSE-MIT" | ||
} | ||
, "devDependencies" : { | ||
} | ||
, "repository" : { | ||
"type" : "git" | ||
, "url" : "git://github.com/SGF-Games/node-simple-logger.git" | ||
} | ||
, "licenses" : [{ | ||
"type" : "MIT" | ||
, "url" : "http://opensource.org/licenses/mit-license.php" | ||
}] | ||
], | ||
"main": "lib/dev-logger", | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
}, | ||
"scripts": { | ||
"test": "na" | ||
}, | ||
"devDependencies": { | ||
"chai": ">=1.2.0", | ||
"mocha": ">=1.3.2", | ||
"should": ">=1.1.0" | ||
}, | ||
"keywords": ["logger", "log", "rotation"] | ||
} |
@@ -1,15 +0,44 @@ | ||
node-simple-logger | ||
================== | ||
# dev-logger | ||
A simple `Logger` utility supports basic debugging level controlling | ||
A logger utility can be easily swiched between dev development and production mode. | ||
This tool supports: | ||
* built-in log rotation | ||
* colorized log message | ||
* 4 log levels and custom log level output | ||
* caching log messages | ||
Usage: | ||
## Install | ||
Install the module with: | ||
`logger = require("logger")` | ||
```bash | ||
npm install dev-logger | ||
``` | ||
`logger.setLevel(logger.ERROR)` | ||
## Usage | ||
```javascript | ||
var logger = require('dev-logger'); | ||
logger.log("normal log message") | ||
logger.warn("warning message") | ||
logger.error(bad error message") | ||
logger.info("success message") | ||
`logger.error "msg"` | ||
// output realtime message | ||
logger.isDebug = true | ||
// output cached log message in an interval and turn on log rotation | ||
logger.isDebug = false | ||
// custom log level, logger.LOG < logger.INFO < logger.WARN < logger.ERROR | ||
logger.setLevel(logger.INFO); | ||
// custom log output path | ||
logger.setPath(pathToLogFile); | ||
``` | ||
## Contributing | ||
mostly written by [@wuyuntao](https://github.com/wuyuntao) | ||
## License | ||
Copyright (c) 2013 yi | ||
Licensed under the MIT license. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
17556
13
263
1
1
45
3
1
1