winston-transport

WebJar for winston-transport

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

winston-transport
Last Version

Last Version

4.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

winston-transport
WebJar for winston-transport
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/winstonjs/winston-transport

Download winston-transport

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/winston-transport/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>winston-transport</artifactId>
    <version>4.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/winston-transport/
implementation 'org.webjars.npm:winston-transport:4.3.0'
// https://jarcasting.com/artifacts/org.webjars.npm/winston-transport/
implementation ("org.webjars.npm:winston-transport:4.3.0")
'org.webjars.npm:winston-transport:jar:4.3.0'
<dependency org="org.webjars.npm" name="winston-transport" rev="4.3.0">
  <artifact name="winston-transport" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='winston-transport', version='4.3.0')
)
libraryDependencies += "org.webjars.npm" % "winston-transport" % "4.3.0"
[org.webjars.npm/winston-transport "4.3.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : readable-stream jar [2.3.6,3)
org.webjars.npm : triple-beam jar [1.2.0,2)

Project Modules

There are no modules declared in this project.

winston-transport

The base TransportStream implementation for winston >= 3. Use these to write ecosystem Transports for winston.

Usage

const Transport = require('winston-transport');
const util = require('util');

//
// Inherit from `winston-transport` so you can take advantage
// of the base functionality and `.exceptions.handle()`.
//
module.exports = class CustomTransport extends Transport {
  constructor(opts) {
    super(opts);

    //
    // Consume any custom options here. e.g.:
    // - Connection information for databases
    // - Authentication information for APIs (e.g. loggly, papertrail,
    //   logentries, etc.).
    //
  }

  log(info, callback) {
    setImmediate(() => {
      this.emit('logged', info);
    });

    // Perform the writing to the remote service

    callback();
  }
};

Tests

Tests are written with mocha, nyc, assume, and abstract-winston-transport. They can be run with npm:

npm test
Author: Charlie Robbins
LICENSE: MIT
org.webjars.npm

winstonjs

A logger for just about everything

Versions

Version
4.3.0
4.2.0
3.0.1