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

log4js-memory-appender

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

log4js-memory-appender - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

test2.js

7

log4js-memory-appender.js

@@ -5,9 +5,8 @@ "use strict";

var layouts = require('log4js').layouts;
var defaultOptions = { buffer : [], maxBufferSize : 100 };
var buffer = null;
var maxBufferSize = null;
options = options || defaultOptions;
buffer = options.buffer || defaultOptions.buffer;
maxBufferSize = options.maxBufferSize || defaultOptions.maxBufferSize;
options = options || {};
buffer = options.buffer || [];
maxBufferSize = options.maxBufferSize || 100;

@@ -14,0 +13,0 @@ var memoryAppender = function(layout, timezoneOffset) {

{
"name": "log4js-memory-appender",
"version": "1.0.0",
"version": "1.0.1",
"description": "log4js memory appender - stores log events in an array. Good for storing a buffer of tail log events to output on a diagnostics page.",

@@ -5,0 +5,0 @@ "main": "log4js-memory-appender.js",

# log4js-memory-appender
log4js memory appender - stores log events in an array. Good for storing a buffer of tail log events to output on a diagnostics page.
A simple memory appender for log4js. It stores log events in an array - good for keeping a buffer of tail logs to output on a diagnostics page.

@@ -5,0 +5,0 @@ ## install

var log4js = require('log4js');
var appender = require('./log4js-memory-appender');
//var buffer = [];
//var maxBufferSize = 100;
var memAppender = appender({ maxBufferSize : 1000 });
//log4js.loadAppender('memory', appender({ buffer : buffer, maxBufferSize : maxBufferSize }));
log4js.loadAppender('memory', memAppender);

@@ -24,5 +21,2 @@ log4js.addAppender(log4js.appenders.memory());

//console.log(memAppender);
console.log(memAppender.getBuffer());
//console.log(buffer);
console.log(memAppender.getBuffer());
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