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

plyo-tools

Package Overview
Dependencies
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plyo-tools - npm Package Compare versions

Comparing version 3.1.2 to 3.1.3

71

lib/logger/logger.server.js

@@ -29,2 +29,3 @@ 'use strict';

var logger = _winston2.default.createLogger({
format: _winston.format.combine(_winston.format.splat(), _winston.format.simple()),
transports: [new Console({

@@ -46,40 +47,40 @@ level: 'verbose',

function setup(options) {
if (options.useFileTransports) {
var dirname = _path2.default.resolve(_path2.default.dirname(require.main.filename), '../logs');
logger.add(File, {
name: 'all', // we need to specify names because we have two transports of the same type
level: 'debug', // default max level is "info", we want to write "verbose" as well
filename: 'all.log',
dirname: dirname,
maxsize: 1000000, // 1Mb
maxFiles: 100,
tailable: true, // the latest logs are always into `all.log`, older messages go to `all.1.log`, ..., `all.n.log`
json: false, // it's too hard for human to read json-encoded sql requests
handleExceptions: true
}).add(File, {
name: 'errors',
filename: 'errors.log',
dirname: dirname,
level: 'error', // only errors go here. Useful for quick look on prod env etc.
maxsize: 1000000, // 1Mb
maxFiles: 100,
tailable: true,
json: false,
handleExceptions: true
}).add(File, {
name: 'logstash',
filename: 'logstash.log',
dirname: dirname,
level: options.logstashTransportLevel || 'verbose',
maxsize: 1000000, // 1Mb
maxFiles: 100,
tailable: true,
logstash: true,
handleExceptions: true
});
}
// if (options.useFileTransports) {
var dirname = _path2.default.resolve(_path2.default.dirname(require.main.filename), '../logs');
logger.add(new File({
name: 'all', // we need to specify names because we have two transports of the same type
level: 'debug', // default max level is "info", we want to write "verbose" as well
filename: 'all.log',
dirname: dirname,
maxsize: 1000000, // 1Mb
maxFiles: 100,
tailable: true, // the latest logs are always into `all.log`, older messages go to `all.1.log`, ..., `all.n.log`
json: false, // it's too hard for human to read json-encoded sql requests
handleExceptions: true
})).add(new File({
name: 'errors',
filename: 'errors.log',
dirname: dirname,
level: 'error', // only errors go here. Useful for quick look on prod env etc.
maxsize: 1000000, // 1Mb
maxFiles: 100,
tailable: true,
json: false,
handleExceptions: true
})).add(new File({
name: 'logstash',
filename: 'logstash.log',
dirname: dirname,
level: options.logstashTransportLevel || 'verbose',
maxsize: 1000000, // 1Mb
maxFiles: 100,
tailable: true,
logstash: true,
handleExceptions: true
}));
// }
if (options.consoleTransportLevel) {
logger.transports.console.level = options.consoleTransportLevel;
logger.transports[0].level = options.consoleTransportLevel;
}
}
{
"version": "3.1.2",
"version": "3.1.3",
"name": "plyo-tools",

@@ -4,0 +4,0 @@ "repository": "plyo/plyo.tools",

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