@natlibfi/loglevel-message-buffer

Plugin for loglevel which allows buffering of log messages


Keywords
log, logger, logging, browser, loglevel-plugin, buffer, flush
License
MIT
Install
npm install @natlibfi/loglevel-message-buffer@1.0.3

Documentation

loglevel Message buffer plugin NPM Version Build Status Test Coverage

Plugin for loglevel which allows buffering of log messages

Usage

AMD

define(['loglevel', 'loglevel-message-buffer'], function(log, loglevelMessageBuffer) {

  loglevelMessageBuffer(log);

  log.warn('TEST');
  // Flushes the buffer and sends all messages forward
  log.flush();

});

Node.js require

var log = require('loglevel');
var loglevelMessageBuffer = require('loglevel-message-buffer');

loglevelMessageBuffer(log);

log.warn('TEST');
  // Flushes the buffer and sends all messages forward
log.flush();

Development

Clone the sources and install the package using npm:

npm install

Run the following NPM script to lint, test and check coverage of the code:

npm run check

License and copyright

Copyright (c) 2016 University Of Helsinki (The National Library Of Finland)

This project's source code is licensed under the terms of MIT License.