Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dev-logger

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dev-logger - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

:w

52

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc