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

2log

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

2log - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

config/default.json

9

CHANGELOG.md
# 2pid changelog
## [1.0.1](link/1.0.1) (2016-06-17)
[Full Changelog](/compare/1.0.0...1.0.1)
**What Was Done:**
- update example of using
- checking config variables
- add default and test config files
## [1.0.0](link/1.0.0) (2016-06-17)

@@ -4,0 +13,0 @@ [Full Changelog](/compare/master...1.0.0)

30

lib/log.js

@@ -11,3 +11,3 @@ /*

var Config = require('ivanoff-config');
var Config = require('2conf');
var config = new Config();

@@ -32,18 +32,20 @@

if(config.log.full) {
winston.add(winston.transports.File, { name: 'full', filename: config.log.full, level: 'info' });
}
if(config && config.log) {
if(config.log.full) {
winston.add(winston.transports.File, { name: 'full', filename: config.log.full, level: 'info' });
}
if(config.log.error) {
winston.add(winston.transports.File, { name: 'error', filename: config.log.error, level: 'error', handleExceptions: true });
}
if(config.log.error) {
winston.add(winston.transports.File, { name: 'error', filename: config.log.error, level: 'error', handleExceptions: true });
}
if(config.log.sell) {
winston.loggers.add('sell', { file: { name: 'sell', filename: config.log.sell, level: 'silly', json: false } });
var sellLog = winston.loggers.get('sell');
sellLog.remove(winston.transports.Console);
if(config.log.sell) {
winston.loggers.add('sell', { file: { name: 'sell', filename: config.log.sell, level: 'silly', json: false } });
var sellLog = winston.loggers.get('sell');
sellLog.remove(winston.transports.Console);
winston.sell = function(message, encoding){
winston.money(message);
sellLog.info(message);
winston.sell = function(message, encoding){
winston.money(message);
sellLog.info(message);
}
}

@@ -50,0 +52,0 @@ }

{
"name": "2log",
"version": "1.0.0",
"version": "1.0.1",
"description": "Logger",
"main": "index.js",
"dependencies": {
"ivanoff-config": "^1.0.1",
"2conf": "^1.0.0",
"moment-timezone": "^0.5.4",

@@ -9,0 +9,0 @@ "winston": "^2.2.0"

# Log
v.1.0.0
v.1.0.1

@@ -15,3 +15,3 @@ ## Install

```javascript
var log = require('ivanoff-log');
var log = require('2log');

@@ -18,0 +18,0 @@ log.info('just info');

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